adworld [rev] reverse-for-the-holy-grail-350

太困了,直接上脚本.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
firstChars = [0x41, 0x69, 0x6E, 0x45, 0x6F, 0x61]
thirdChars = [0x02EF, 0x02C4, 0x02DC, 0x02C7, 0x02DE, 0x02FC]
masterArray = [0x1D7, 0x0C, 0x244, 0x25E, 0x93, 0x6C]
flag = [0] * 18
hashCode = 666
j = 0

for i in range(0, 18, 3):
flag[i] = firstChars[j]
tmp = hashCode
hashCode += hashCode % 5
for k in range(1, 128):
if (k ^ hashCode) * (flag[i] ^ tmp) % (thirdChars[j]) == masterArray[j]:
flag[i + 1] = k
break
hashCode += hashCode % 5
flag[i + 2] = thirdChars[j] ^ hashCode
hashCode += hashCode % 5
j += 1

print(''.join(list(map(chr, flag))))