Press "Enter" to skip to content

[H4CK1T]Crypt0P1xels – 250pt

Desciprion:

EN: We have received pictures from the enemy companion of theunknown before planet. And we haven't thought up anything better,than to construct DeathStarV3 (the general was a fan of "StarWars") and to absorb energy of the whole planet! And again we arepursued by problems: that we don't know coordinate! Your task is todetermine coordinates of this unique planet (which according to ourspy are ciphered in the image). Also he could steal one of thescripts intended for embedding of coordinates. All hope only foryou!
Solution:
第一步是先看懂題目給予的 SECRET_TOOL.py
code:
0,0這個pixel的Red value代表的是flag的長度是多少 , 經查看後發現其值是33

然後第一步是生成一個1-255的x和y , 將 (len(flag),x,y)寫入0,0
第二步是生成1-255的x1和y1 , 然後將(ascii(flag[i]),x1,y1)) 寫入 x y中 , 然後將x= x1 , y = y1
第三步是生成1-255的x1和y1 , 然後將(ascii(flag[i]),x1,y1)) 寫入 x y中
...
我們可以看清楚其pattern為 , 寫入的x y為上一個的G 和 B value , 而R value存放的是flag 第n 隻字的ascii值
所以我們可以先找出可能的pixel 和 x y值
code:
得出

然後根據pattern排序後得出

取Red value 並由ascii轉為char

code:
output:

所以flag是

 

Comments