四进制解码

密文直输版

ciphertxt = '1212 1230 1201 1213 1323 1012 1233 1311 1302 1202 1201 1303 1211 301 302 303 1331'
c = ciphertxt.split(' ')
flag = ''
for i in c:
    temp = 0
    for j in range(len(i)):
        temp += (4**j)*int(i[-j-1])

    flag += chr(int(temp))
print(flag)

txt版

m = ''
with open("txt","r") as f:
    text = f.read()
    c = text.split(" ")
    for i in c:
        temp = 0
        for j in range(len(i)):
            temp += (4**j)*int(i[-j-1])
        m += chr(int(temp))
print(m)
posted @ 2021-10-25 17:50  404p3rs0n  阅读(170)  评论(0编辑  收藏  举报