逆向-攻防世界-IgniteMe
flag标准格式:EIS{XXXXXX},对长度也做了限制。
关键比较函数。
算法很简单,直接写脚本。
import string result = '' tmp = ['0x0D', '0x13', '0x17', '0x11', '0x2', '0x1', '0x20', '0x1D', '0x0C', '0x2', '0x19', '0x2F', '0x17', '0x2B', '0x24', '0x1F', '0x1E', '0x16', '0x9', '0xF', '0x15', '0x27', '0x13', '0x26', '0x0A', '0x2F', '0x1E', '0x1A', '0x2D', '0x0C', '0x22', '0x4'] f = 0 r = '' comp = 'GONDPHyGjPEKruv{{pj]X@rF' s = string.printable print(s) for i in range(24): for x in s: j = x if 97 <= ord(j) <= 122: x = chr(ord(j) - 32) f = 1 if f == 0 and 65 <= ord(j) <= 90: x = chr(ord(j) + 32) r = chr(int(tmp[i], 16) ^ (ord(x) ^ 0x55) + 72) f = 0 if r == comp[i]: result += j break print(result)