[SWPUCTF 2021 新生赛]re1
- IDA反编译 发现只是做简单字符替换 写exp
- exp
#include <iostream>
using namespace std;
string str2 = "{34sy_r3v3rs3}";
void dfs(int now)
{
if (now == str2.length() - 1)
{
cout << "NSSCTF" << str2 << endl;
return;
}
if (str2[now] == 52)
{
str2[now] = 97;
dfs(now + 1);
str2[now] = 52;
dfs(now + 1);
}
else if (str2[now] == 51)
{
str2[now] = 101;
dfs(now + 1);
str2[now] = 51;
dfs(now + 1);
}
else
{
dfs(now + 1);
}
}
int main()
{
freopen("ans.txt", "w", stdout);
dfs(0);
}
得到flag