攻防世界 reverse parallel-comparator-200

送分小仙女□ 提交于 2020-05-07 21:26:19

parallel-comparator-200 school-ctf-winter-2015

https://github.com/ctfs/write-ups-2015/tree/master/school-ctf-winter-2015/reverse/parallel-comparator-200

linux平台,mark,以后解决。

给出了源代码,关键在于checking函数返回0

void * checking(void *arg) {
    char *result = malloc(sizeof(char));
    char *argument = (char *)arg;
    *result = (argument[0]+argument[1]) ^ argument[2];
    return result;
}

 

另一点是

while ((initialization_number = random()) >= 64);
    
    int first_letter;
    first_letter = (initialization_number % 26) + 97;
initialization_number 其实是个固定值,调试时可得到

wp:

differences = [0, 9, -9, -1, 13, -13, -4, -11, -9, -1, -7, 6, -13, 13, 3, 9, -13, -11, 6, -7]
first_letter = 108
print (''.join([chr(first_letter+differences[i]) for i in range(len(differences))]))

lucky_hacker_you_are

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!