-
-
[原创]KCTF 2019 Q1 第1题----流浪者
-
发表于: 2019-3-24 21:07 4268
-
解题思路:
目标字符串为:KanXueCTF2019JustForhappy
目标字符串获取方法如下:
int main() { string Str = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int index[] = {19,0,27,59,44,4,11,55,14,30,28,29,37,18,44,42,43,14,38,41,7,0,39,39,48}; for (int j = 0; j < 25; j++) { for (int i = 0; i < Str.length(); ++i) { if (Str[i] > 0x39 || Str[i] < 0x30) { if (Str[i] > 0x7A || Str[i] < 0x61) { if (Str[i] > 0x5A || Str[i] < 0x41) { continue; } else { if (index[j] == Str[i] - 0x1D) { cout << Str[i]; } } } else { if (index[j] == (Str[i] - 0x57)) { cout << Str[i]; } } } else { if (index[j] == (Str[i] - 0x30)) { cout << Str[i]; } } } } system("pause"); return 0; }
最后结果为:j0rXI4bTeustBiIGHeCF70DDM
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课
赞赏
他的文章
看原图
赞赏
雪币:
留言: