BUUCTF_Crypto_异性相吸

题目给了一个key和密文:

BUUCTF_Crypto_异性相吸

使用010editor得到文件的二进制格式,然后将两个异或,脚本:

a = '0110000101110011011000010110010001110011011000010111001101100100011000010111001101100100011000010111001101100100011000010111001101100100011000010111001101100100011000010111001101100100011000010111001101100100011000010111001101100100011000010111001101100100011100010111011101100101011100110111000101100110'
b = '0000011100011111000000000000001100001000000001000001001001010101000000110001000001010100010110000100101101011100010110000100101001010110010100110100010001010010000000110100010000000010010110000100011000000110010101000100011100000101010101100100011101010111010001000001001001011101010010100001010000011011'
c = ''
d=0
f=''
for i in range(len(a)):
    if(a[i] == b[i]):
        c+='0'
    else:
        c+='1'
for i in range(len(c)):
        d+=1
        f+=c[i]
        if d%8==0:
            f+=' '
print(f)

最后直接输出已经分隔好的二进制,直接转字符就可以得到flag

flag{ea1bc0988992276b7f95b54a7435e89e}

上一篇:BUUCTF_N1book_[第七章 CTF之CRYPTO章]KeyBoard


下一篇:BUUCTF,Crypto:一眼就解密