通过字符串交叉引用,找到函数。看到是一个xor后的比较

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
s2 = [0x56, 0x4E, 0x57, 0x58, 0x51, 0x51, 0x09, 0x46, 0x17, 0x46,
0x54, 0x5A, 0x59, 0x59, 0x1F, 0x48, 0x32, 0x5B, 0x6B, 0x7C,
0x75, 0x6E, 0x7E, 0x6E, 0x2F, 0x77, 0x4F, 0x7A, 0x71, 0x43,
0x2B, 0x26, 0x89, 0xFE, 0x00]
s1 = 'qasxcytgsasxcvrefghnrfghnjedfgbhn'
a = ""
flag = ""
print(len(s1))
print(len(s2))
for i in range(33):
temp = ord(s1[i]) ^ (2 * i + 65)
flag += chr(temp ^ s2[i])
print(flag+'}')

# flag{c0n5truct0r5_functi0n_in_41f}