#include <windows.h>
#include <stdio.h>
DWORD funcHash1(char *s)
{
DWORD i , k ;
BYTE table[] = {
0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
0x20, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x20, 0x00, 0x20, 0x00,
0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
0x48, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00,
0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00,
0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00,
0x84, 0x00, 0x84, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00,
0x10, 0x00, 0x81, 0x00, 0x81, 0x00, 0x81, 0x00, 0x81, 0x00, 0x81, 0x00, 0x81, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00,
0x10, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x02, 0x00,
0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00,
0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00,
0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x20, 0x00 } ;
//for(i = 0 ; (table[s[i]*2] & 0x8) != 0 ; i++) ;
for(i = 0, k = 0 ; (table[s[i]*2] & 0x4) != 0 ; i++)
{
k = 10*k + s[i] - 0x30 ;
}
return k ;
}
DWORD funcHash2(char *s, DWORD dwHash)
{
DWORD table[] = {0x96, 0x95, 0x10, 0x23, 0x7, 0x15, 0x8, 0x3, 0x10, 0x11} ;
int i ;
for(i = 0 ; s[i] != '\0' && i < 10 ; i++)
{
dwHash = (s[i] ^ table[i]) + dwHash*4 ;
}
return (dwHash % 0x186A0) ;
}
int main()
{
DWORD Key_1, Key_2, Key_3 ;
char szKeyPart2[24], szKeyPart3[24] ;
int i , j , count ;
count = 0 ;
for(i = 0 ; i < 1000000 ; i++)
{
sprintf(szKeyPart2, "%06d", i) ;
for(j = 0 ; j < 100000 ; j++)
{
sprintf(szKeyPart3, "%05d", j) ;
Key_1 = funcHash1(szKeyPart2) ;
Key_2 = funcHash2(szKeyPart2, Key_1) ;
Key_3 = funcHash1(szKeyPart3) ;
if(Key_2 == Key_3)
{
printf("Hit %d Succeed !\n", ++count) ;
printf("SI3US-%s-%s\n\n", szKeyPart2, szKeyPart3) ;
if(count % 10 == 0)
system("pause > nul") ;
}
}
}
return 0 ;
}
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)