拖进ida找到关键函数,要输入个幸运数,首先是偶数,在之后有个生成随机数的函数,果然是luck啊
从这看来flag就是f1+f2,双击f1,看到f1给了GXY{do_not,那么f2呢,可以看到下面几个case,f2先是被s赋值,后又有个循还,我感觉答案马上就出来了,代码基本可以原封不动贴上,脚本运行,get, 但是注意,s的数值要倒序存
#include<iostream>
using namespace std
;
#include<string>
int main()
{
char v1
;
string f1
="GXY{do_not";
string f2
={0x69,0x63,0x75,0x67,0x60,0x6F,0x66,0x7F,};
for ( int j
= 0; j
<= 7; ++j
)
{
if ( j
% 2 == 1 )
v1
= f2
[j
] - 2;
else
v1
= f2
[j
] - 1;
f2
[j
] = v1
;
}
cout
<<f1
<<f2
<<endl
;
}
总结
倒着倒着