虎符2020部分re
目录
game
根据python的反汇编代码可以得到下面的逻辑:
- check0 每个字符为32 - 128
- check1(s): len(s) < 100 && (len * len % 777) ^ 233 == 513 > len(s) = 39
- check2(s): ((s[0]*128 + s[1])) * 128) + s[2]…s[5]=3533889469877 -> s[5]=‘5’
- check3:
arr = map(ord(s))
a = arr[slice(6, 30, 3)]
for i in range(len(a))
(a[i]*17684 + 372511)% 257 == arr0[i]
b = arr[slice(-2, 33, -1)] * 5
c = map(lambda x[0] ^ x[1], zip(b, arr[slice(7, 27)]))
if c != arr1:
p = 0
for i in range(28, 34):
(arr[i] + 107) / 16 + 77 == arr2[p]
(arr[i] + 117) % 16 + 99 == arr2[p + 1]
p = p + 2
|
|
vm
是个逻辑很清楚的vm,但是wtcl比赛时间对我来说有点短不够我翻译的…后面才做出来的,根据逻辑写出parser
|
|
根据parser解析的结果分析加密逻辑就能写出解密的代码
|
|