Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 1.02 KB

File metadata and controls

29 lines (24 loc) · 1.02 KB

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: