MENU

CG-CTF 异性相吸

CG-CTF

解密压缩文件里的内容
提取密码:assm
TIPS: 1.xor 2.hex2binary 3.len(bin(miwen))==len(bin(mingwen))
https://pan.baidu.com/s/1kVssDb5

蒙题是有技巧的。——沃·兹基硕德

将明文与密文字符逐一对应异或,结果即为flag。

mingwen = open('明文.txt', 'rb').read()
miwen = open('密文.txt', 'rb').read()
flag = ''
if __name__ == "__main__":
    for i in range(len(mingwen)):
        flag += chr(mingwen[i] ^ miwen[i])
    print(flag)
Tags: CTF, Crypto
Leave a Comment

captcha
请输入验证码