(Jarvis OJ)(Re)stheasy

(Jarvis OJ)(Re)stheasy

丢到ida中反汇编找到main函数
(Jarvis OJ)(Re)stheasy_第1张图片

找到关键的check()函数
(Jarvis OJ)(Re)stheasy_第2张图片
程序的逻辑大概就是输入一个字符串,先判断长度,在和内置的数据进行对比,相等则return 1,内置数据的变化很简单。
找到.data段中定义的数据。

(Jarvis OJ)(Re)stheasy_第3张图片
编写程序

1 #include
  2 int main(void){
  3 char cipher[]="lk2j9Gh}AgfY4ds-a6QW1#k5ER_T[cvLbV7nOm3ZeX{CMt8SZo]U";
  4 unsigned int  key[]={0x48,0x5d,0x8d,0x24,0x84,0x27,0x99,0x9f,0x54,0x18,0x1e,0x69,0x7e,0x33,0x15,0x72,0x8d,0x33,0x24
  5     ,0x63,0x21,0x54,0x0c,0x78,0x78,0x78,0x78,0x78,0x1b};
  6 for(int i=0;i<29;i++){
  7     unsigned int t=key[i]/3-2;
  8     for(int j=0;j<=127;j++)                                                                                        
  9         if(j==cipher[t])
 10             printf("%c",j);
 11     }       
 12 return 0;
 13 }

你可能感兴趣的:(re)