BUUCTF 梅花香自苦寒来


梅花香自苦寒来

打开图片可以看到,在jpg后面有大量的数据,
在这里插入图片描述
将它保存出来,可以看出是十六进制,将它转为ascii,写脚本

 
with open('hex.txt','r') as h: h=h.read() tem=''
for i in range(0,len(h),2): tem='0x'+h[i]+h[i+1] tem=int(tem,base=16) print(chr(tem),end='')

 

得到

 
(7,7)
(7,8)
(7,9)
(7,10)
(7,11)
(7,12)
(7,13)
(7,14)
(7,15)
(7,16)
(7,17)
(7,18)
(7,19)
(7,20)
(7,21)
(7,22)
(7,23)

 

35019个坐标,用gnuplot绘图,但要先改为gnuplot能识别的方式,写脚本

with open('ascii.txt','r')as a: a=a.read() a=a.split() tem=''
for i in range(0,len(a)): tem=a[i] tem=tem.lstrip('(') tem=tem.rstrip(')') for j in range(0,len(tem)): if tem[j]==',': tem=tem[:j]+' '+tem[j+1:] print(tem)

 

 用gnuplot

在这里插入图片描述
得到
在这里插入图片描述
扫码得flag


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM