BUUCTF:[SWPU2019]Network

题目来源:https://buuoj.cn/challenges#[SWPU2019]Network

题目给了txt文件

 TTL隐写

贴个代码

with open('attachment.txt') as f:
    lines = f.readlines()
n_num = []
#分析出所有的数
for i in lines:
    if i!='\n':
        n_num.append(int(i))
#拿到每个TTL值的高位
rlt = ''
for i in range(0,len(lines)):
    tmp = bin(n_num[i])[2:]
    tmp = '0'*(8-len(tmp)) + tmp
    rlt += tmp[0:2]
#得到最终的结果并存到文件中
rlt2 = ''
for i in range(0,len(rlt),8):
    rlt2 += chr(int(rlt[i:i+8],2))
with open('output.txt','w') as f:
    f.write(rlt2.rstrip())

运行后得到如下文件

熟悉的504b0304开头 以十六进制文本粘贴到010editor

得到一个伪加密的zip

修改标识位后打开

base64套娃

得到:flag{189ff9e5b743ae95f940a6ccc6dbd9ab}

参考:https://blog.csdn.net/mochu7777777/article/details/109633675
   https://www.cnblogs.com/chrysanthemum/p/11993106.html
posted @ 2022-01-27 17:54  B0mbax  阅读(202)  评论(0编辑  收藏  举报