import base64 flag = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX" xor = ? print(len(xor)) print(base64.b64encode(("".join([chr(ord(i)^ord(xor)) for i inlist(flag)])).encode("ASCII"))) #1 #b'Og9hNAFrCjU9aQ4+C2psLzxpYRE6azw+FmphPgk2EjQBDyw+DWsKIQIPHiwAaBYoOx8wNBU2aGU='
一看xor就一位,爆破!!!
1 2 3 4 5 6 7 8 9 10 11 12 13
import base64 f = open("out2.txt","w",encoding="utf-8") flag = b'Og9hNAFrCjU9aQ4+C2psLzxpYRE6azw+FmphPgk2EjQBDyw+DWsKIQIPHiwAaBYoOx8wNBU2aGU=' flag = base64.b64decode(flag) f.write("\n————————————————开始爆破————————————————\n\n\n") for i inrange(0,128): f.write(str(i)) ans="" for j in flag: ans = ans + (chr(i^j)) f.write(ans) f.write("\n————————————————————分割线——————————————————————\n\n")