CTF密码学Crypto3

CTF密码学Crypto3

    • 1.核心价值观编码
    • 2.进制转化题

1.核心价值观编码

CTF密码学Crypto3_第1张图片
直接利用工具解密:CTF密码学Crypto3_第2张图片

2.进制转化题

CTF密码学Crypto3_第3张图片
题目中的数字为0-9,字符都没有超过F,分析可能是16进制转换,利用转换工具转换为文本字符串。
工具链接:https://www.sojson.com/hexadecimal.html

CTF密码学Crypto3_第4张图片

CTF密码学Crypto3_第5张图片打开text,txt文本得到下列字符串,
D:十进制数Decima
B:二进制数Binary
0x(H):十六进制数Hexadecimal
O:八进制数Octal
CTF密码学Crypto3_第6张图片编写python代码将字符统一转换为16进制,再利用工具16进制转文本:

text=["d87","x65","x6c","x63","o157","d109","o145","b100000","d116","b1101111","o40","x6b","b1100101","b1101100","o141","d105","x62","d101","b1101001","d46","o40","d71","x69","d118","x65","x20","b1111001","o157","b1110101","d32","o141","d32","d102","o154","x61","x67","b100000","o141","d115","b100000","b1100001","d32","x67","o151","x66","d116","b101110","b100000","d32","d102","d108","d97","o147","d123","x31","b1100101","b110100","d98","d102","b111000","d49","b1100001","d54","b110011","x39","o64","o144","o145","d53","x61","b1100010","b1100011","o60","d48","o65","b1100001","x63","b110110","d101","o63","b111001","d97","d51","o70","d55","b1100010","d125","x20","b101110","x20","b1001000","d97","d118","o145","x20","d97","o40","d103","d111","d111","x64","d32","o164","b1101001","x6d","o145","x7e"]
t=""
t1=""
for i in text:   
        if i[0:1]=='d':
            t=str(hex(int(i[1:])))
            t=t[2:]
            t1=t1+t
        if i[0:1]=='x':
            t=i[1:]
            t1=t1+t
        if i[0:1]=='o':
            t=str(hex(int(i[1:],8)))
            t=t[2:]
            t1=t1+t            
        if i[0:1]=='b':
            t=str(hex(int(i[1:],2)))
            t=t[2:]
            t1=t1+t
print(t1)

用IDLE运行得到16进制数码:
CTF密码学Crypto3_第7张图片
获取flag:
CTF密码学Crypto3_第8张图片

你可能感兴趣的:(BUUCTF,Crypto)