剧情九
下载:
.pyc python的保护模式
进行在线反编译。
逆向输出就好:(考的算法逆向。)
脚本:
import base64def decode1(ans):s = ''for i in ans:x = ord(i) - 25x = x ^ 36s += chr(x)return sdef decode2(ans):s = ''for i in ans:if isinstance(i, int):i = chr(i)# 易错点, 因为密文中有int类型(0-9) 所以 需要进行转码变成字符串(python好像自己识别不了)x = ord(i) ^ 36x = x - 36s += chr(x)return sdef decode3(ans):return base64.b32decode(ans)final = 'UC7KOWVXWVNKNIC2XCXKHKK2W5NLBKNOUOSK3LNNVWW3E==='decoded3 = decode3(final)
decoded2 = decode2(decoded3)
decoded1 = decode1(decoded2)
# 加密时。 3>2>1 逆向 3<2<1print(decoded1)
结果:
cyberpeace{interestinghhhhh}