Skip to content

Latest commit

 

History

History

misc_100_doesnt_matter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

She said it doesn't matter (misc/stego, 100p)

PL Version

ENG

W zadaniu dostajemy obrazek png z zepsutym nagłówkiem. Rozpakowujemy zawartość pliku i za pomocą pozyskanych pikseli tworzymy obrazek, w którym ukryta jest flaga. Musimy ustawić dobre wymiary obrazka, które różnią sie od odczytanych z nagłówka. Po paru próbach odnajdujemy właściwe wartości.

from PIL import Image
with open('zlibdec.bin','rb') as f:
	data=f.read()
im = Image.frombytes('RGB',(891,550),data)
im.show()

i w wyniku otrzymujemy:

ENG Version

We get png picture with broken header checksum. With pixels extracted from file we make picture using them. We have to set good size of picture and mode, since data from broken header are misleading. After some trials we can easly find right values.

from PIL import Image
with open('zlibdec.bin','rb') as f:
	data=f.read()
im = Image.frombytes('RGB',(891,550),data)
im.show()

as a result we get: