Baby-XoR 附件给了两个文件分别是 baby_xor.py 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #!/usr/bin/env python3 # -*- coding: utf-8 -*- from flag import flag def xor(u, v): return ''.join(chr(ord(cu) ^ ord(cv)) for cu, cv in zip(u, v)) u = flag v = flag[1:] + flag[0] enc = open('flag.enc', 'w') enc.write(xor(u, v)) enc.close() flag.enc 1 2