EasyHook XCTF 4th-WHCTF-2017 offensive in the world

This question should be is also very simple

E9 -5 these things is to see that the hook

Then into the hook inside to look out a lot of things

Direct algorithm Reverse

#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<vector>
#include<iostream>
#include<map>
#include<time.h>
#include<queue>
#include "windows.h"
using namespace std;
unsigned char str[] =
{
  0x61, 0x6A, 0x79, 0x67, 0x6B, 0x46, 0x6D, 0x2E, 0x7F, 0x5F,
  0x7E, 0x2D, 0x53, 0x56, 0x7B, 0x38, 0x6D, 0x4C, 0x6E, 0x00
};
int main()
{
    str[18]^=0x13u;
    int v3;
    for(int i=17;i>=0;i--)
    {
     v3 = i ^ str[i];
     if(i%2)
        str[i] = v3 + i;
     else
        str[i+2] = v3;
    }
    printf("%s\n",str);
    return 0;
}

But the conclusion that the answer is

Finally, the correct answer is to pay up flag {xxx} 

 

Guess you like

Origin blog.csdn.net/qq_41071646/article/details/90742254