xctf-Ph0en1x-100

回家的第一篇文章~~~~

其实是 很简单  的一道题   回家后 效率会降得很低  这个 只能偶尔学习一下下  

这个题 先看一下 jar

xctf-Ph0en1x-100

 然后  两边都经过了  getSecret  我们就不看这个函数了  我们直接去看 getflag  还有encrypt  

这个是 getflag

xctf-Ph0en1x-100

下面  enctypt

xctf-Ph0en1x-100

enctypt其实很好理解 直接就是将字符asicc值 减去一  

但是  getflag 就有点头疼了  这怎么搞得呢  

然后我就想到了     直接 log 出来  本来我是想把  getflag 的返回值直接搞到 输入框内 但是程序崩溃了  只能 log 出来了  

然后在这里修改一下就好了

xctf-Ph0en1x-100

然后 打包 运行 

xctf-Ph0en1x-100

得到密文   ek`[email protected]^x/t^fn0mF^6/^rb`qanqntfg^E`hq|

然后 +1 就可以了  得出flag  flag{Ar3_y0u_go1nG_70_scarborough_Fair}

#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <queue>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
char s[]="ek`[email protected]^x/t^fn0mF^6/^rb`qanqntfg^E`hq|";
int main()
{
    for(int i=0;i<strlen(s);i++)
    {
        printf("%c",s[i]+1);
    }
    return 0;
}