CG CTF CRYPTO 异性相吸
生活随笔
收集整理的這篇文章主要介紹了
CG CTF CRYPTO 异性相吸
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
https://pan.baidu.com/s/1kVssDb5
TIPS:
提取密碼:assm
1.xor
2.hex2binary
3.len(bin(miwen))==len(bin(mingwen))
題解:?
工具:010Editor
使用010Editor打開兩個文件 , 轉換成二進制模式
明文:
01101100 01101111 01110110 01100101 01101100 01101111 01110110 01100101 01101100 01101111 01110110 01100101 01101100 01101111 01110110 01100101 01101100 01101111 01110110 01100101 01101100 01101111 01110110 01100101 01101100 01101111 01110110 01100101 01101100 01101111 01110110 01100101密文:
00001010 00000011 00010111 00000010 01010110 00000001 00010101 00010001 00001010 00010100 00001110 00001010 00011110 00110000 00001110 00001010 00011110 00110000 00001110 00001010 00011110 00110000 00010100 00001100 00011001 00001101 00011111 00010000 00001110 00000110 00000011 00011000XOR處理
01100110 01101100 01100001 01100111 00111010 01101110 01100011 01110100 01100110 01111011 01111000 01101111 01110010 01011111 01111000 01101111 01110010 01011111 01111000 01101111 01110010 01011111 01100010 01101001 01110101 01100010 01101001 01110101 01100010 01101001 01110101 01111101XOR處理源程序
C++版本
int main(){char a[] = "0000101000000011000101110000001001010110000000010001010100010001000010100001010000001110000010100001111000110000000011100000101000011110001100000000111000001010000111100011000000010100000011000001100100001101000111110001000000001110000001100000001100011000";char b[] = "0110110001101111011101100110010101101100011011110111011001100101011011000110111101110110011001010110110001101111011101100110010101101100011011110111011001100101011011000110111101110110011001010110110001101111011101100110010101101100011011110111011001100101";for(int i=0;i<256;i++){printf("%d",a[i]^b[i]);} }Python版本
a = '0000101000000011000101110000001001010110000000010001010100010001000010100001010000001110000010100001111000110000000011100000101000011110001100000000111000001010000111100011000000010100000011000001100100001101000111110001000000001110000001100000001100011000' b = '0110110001101111011101100110010101101100011011110111011001100101011011000110111101110110011001010110110001101111011101100110010101101100011011110111011001100101011011000110111101110110011001010110110001101111011101100110010101101100011011110111011001100101' for i in range(len(a)):if(a[i] == b[i]):print '0',else:print '1',打開010Editor , 創建一個新的Hex文件 , 粘貼為二進制數據?
flag?
flag:nctf{xor_xor_xor_biubiubiu}?
總結
以上是生活随笔為你收集整理的CG CTF CRYPTO 异性相吸的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CG CTF CRYPTO Keyboa
- 下一篇: 牛客练习赛49