能力值:
( LV3,RANK:30 )
|
-
-
5 楼
正巧刚刚在做一个Base64的CrackMe。逆出来的代码太难看了 ,呵呵
#include <stdio.h>
unsigned char Table[500]={0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3E,0xFF,0xFF,0xFF,0x3F,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0xFF,0xFF,0xFF,0x00,0xFF,0xFF
,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0xFF,0xFF,0xFF,0xFF,0xFF
,0xFF,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0xFF,0xFF,0xFF,0xFF,0xFF
,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
,0x02,0x00,0x00,0x00,0x57,0xF6,0x84,0xDC,0xA8,0x09,0x7B,0x23,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF};
void Base64(char *szUserName, char *szResult);
void main()
{
char szUser[]={"QUFodHRwOi8vbWRsMTAubXlkb3duLmNvbS95dWxlLzIwMDcwMS8yMDA3bXQuV01WWlo="};
char szResult[20]={""};
Base64(szUser,szResult);
printf("%s\n",szResult);
}
void Base64(char *szUserName, char *szResult)
{
unsigned int i,j=0,k;
unsigned int eax,ebx,ecx,edx,ebp;
unsigned char al,ah,bl,bh,cl,ch,dl,dh;
unsigned char c;
i=0;
while(c!=0)
{
c=szUserName[i];
i=i+4;
}
eax=0x3D;
al=eax & 0xFF;
ah=(eax & 0xFF00)>>8;
ebp=i-4;
if(ebp==0)
return;
if(al==szUserName[ebp-1])
{
dl=1;
szUserName[ebp-1]=ah;
}
else{dl=0;}
if(al==szUserName[ebp-2])
{
al=1;
szUserName[ebp-1]=ah;
}
else{al=0;}
al=al+dl;
eax=al;
ebp=ebp/4;
edx=ebp+ebp*2;
edx=edx-eax;
while(ebp!=0)
{
ecx=*((int*)szUserName);
cl=ecx & 0xFF;
ch=(ecx & 0xFF00)>>8;
al=Table[cl];
ah=Table[ch];
ecx=ecx>>16;
cl=ecx & 0x000000FF;
ch=(ecx & 0x0000FF00)>>8;
szUserName=szUserName+4;
bl=Table[cl];
bh=Table[ch];
dl=ah;
dh=bl;
al=al<<2;
bl=bl>>2;
dh=dh<<6;
ah=ah<<4;
dl=dl>>4;
bh=bh | dh;
al=al | dl;
ah=ah | bl;
szResult[j]=al;
szResult[j+2]=bh;
szResult[j+1]=ah;
j=j+3;
ebp--;
}
szResult[j]='\0';
}
|