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