01-OllyDbg调制器
1.1 TraceMe注册机
unsigned char Table[8] = {0xC, 0xA, 0x13, 0x9, 0xC, 0xB, 0xA, 0x8}
BOOL GenRegCode(TCHAR *rCode, TCHAR *name, int len)
{
int i, j;
unsigned long code=0;
for (i=3,j=0; i < len; i++, j++){
if (j > 7) j = 0;
code += ((BYTE)name[i])*Table[j];
}
wsprintf(name, TEXT("%ld"), code);
if (lstrcmp(rCode, name) == 0) return true;
else return false;
}
name = "test"
Table = [12, 10, 19, 9, 12, 11, 10, 8]
code = 0
i = 3
j = 0
while True:
if i < len(name):
if j > 7:
j = 0
code +=(int(ord(name[i]))*Table[j])
i+=1
j+=1
else:
break
print(code)