IceCTF – Modern Picaso

IceCTF – Modern Picaso

This test provides us this GIF file:



For solve this challenge, you have been split this gif for extract all their frames, and then, put black pixels from all frames in the same position, but in new 300×300 image. I maked this with python and PIL:


import sys
from PIL import Image

img ='RGB', (300,300), (255, 255, 255))

for infile in sys.argv[1:]:
		im =
		rgb_im = im.convert('RGB')
		for i in range(300):
			for j in range(300):
				r, g, b = rgb_im.getpixel((i, j))
				if r == 0 and g == 0 and b == 0:
					print("pixel: x=%d and y=%d"%(i,j))
	except IOError:
		pass"result.png", "PNG")

1- Extract all picasso gif frames in picasso dir:

~/picasso$ convert -coalesce picasso.gif image00%05d.png

2- Execute the script like this:

~/picasso$ python image0000001.png image0000008.png image0000015.png image0000022.png image0000029.png image0000036.png image0000043.png image0000050.png image0000057.png image0000064.png image0000002.png image0000009.png image0000016.png image0000023.png image0000030.png image0000037.png image0000044.png image0000051.png image0000058.png image0000065.png image0000003.png image0000010.png image0000017.png image0000024.png image0000031.png image0000038.png image0000045.png image0000052.png image0000059.png image0000066.png image0000004.png image0000011.png image0000018.png image0000025.png image0000032.png image0000039.png image0000046.png image0000053.png image0000060.png image0000067.png image0000005.png image0000012.png image0000019.png image0000026.png image0000033.png image0000040.png image0000047.png image0000054.png image0000061.png image0000006.png image0000013.png image0000020.png image0000027.png image0000034.png image0000041.png image0000048.png image0000055.png image0000062.png image0000007.png image0000014.png image0000021.png image0000028.png image0000035.png image0000042.png image0000049.png image0000056.png image0000063.png

3- Image result:



Los comentarios están cerrados