写的一手骗流量的好帖,你这这些只能偏偏新手;给你一段触摸屏的加密代码你看看,看看有没BUG:
各种触摸屏的脚本语言格式可能不是很一样,我这个是Kinco的,把头文件和部分关键字换一下可以上维纶和昆仑;
#include "macrotypedef.h"
#include "math.h"
/*
Read,Write Local address function:
int ReadLocal( const char *type, int addr, int nRegs, void *buf, int flag );
int WriteLocal( const char *type, int addr, int nRegs, void *buf , int flag );
Parameter: type is the string of "LW","LB" etc;
return value : 1 ,Operation success
eg: read the value of local lw200 and write it to the lw202,with the codetype BIN,
The code is :
short buf[2] = {0};
ReadLocal("LW", 200, 2, (void*)buf, 0);
WriteLocal("LW", 202, 2, (void*)buf, 0);
*/
int MacroEntry()
{
short Date[3]={0};
short Lic[8]={0};
short Cd[16]={0};
short Subb[6]={0};
short i,j;
short YTen,YGe,MTen,MGe,DTen,DGe,Y,M,D;
//short Year,Month,Dat;
ReadLocal("LW",10003,3,(void*)Date,0); //获取现在日期
int temp=Date[2]*10000+Date[1]*100+Date[0];
CuDG=temp; //当前日期组合
ReadLocal("RW",200,8,(void*)Lic,0); //获得8个字的授权号
for( i=0,j=0;i<16;i++)
{
if(i%2==0)
Cd=Lic[j] & 0xff;
else
{
}
if(!(Cd>='A' && Cd<= 'Z' ) )
{
Fail=1;
return 0;
}
}
WriteLocal("LW", 20, 16, (void*)Cd, 0); //将拆解后的字符放到LW20-35中
if(Date[1]%2==0) //假如是偶数月
{
YTen=Cd[2]-'H';
YGe=Cd[4]-'E';
MTen=Cd[6]-'I';
MGe=Cd[8]-'J';
DTen=Cd[10]-'K';
DGe=Cd[12]-'F';
}
else
{
YTen=Cd[1]-'F';
YGe=Cd[5]-'E';
MTen=Cd[9]-'M';
MGe=Cd[11]-'H';
DTen=Cd[13]-'U';
DGe=Cd[15]-'M';
}
Subb[0]=YTen;
Subb[1]=YGe;
Subb[2]=MTen;
Subb[3]=MGe;
Subb[4]=DTen;
Subb[5]=DGe;
WriteLocal("LW", 40, 6, (void*)Subb, 0);
Y=YTen*10+YGe;
M=MTen*10+MGe;
D=DTen*10+DGe;
Rq=20000000+Y*10000+M*100+D;
Fail=0;
if(Y>30 || Y<16 || M>12 || M <1 || D>31 || D<1 || Rq<=CuDG)
{
Fail=1;
}
else
{
Fail=0;
if((2000+Y-Date[2])>=2)
KGH=1;
}
return 0;
}