Skip to content

Instantly share code, notes, and snippets.

@xavierskip
Last active July 20, 2020 12:55
Show Gist options
  • Save xavierskip/7d9ebda978828d6c8cbba50b6ebb41e9 to your computer and use it in GitHub Desktop.
Save xavierskip/7d9ebda978828d6c8cbba50b6ebb41e9 to your computer and use it in GitHub Desktop.
[ctf]Pretty Pixels
# Don't get me wrong, I love pretty colors as much as the next guy... but what does it mean? pretty_pixels.png
# https://static2.ichunqiu.com/icq/resources/fileupload/CTF/IceCTF/stego/pretty.png
from PIL import Image
from sys import stdout
img = Image.open('pretty.png')
x_size, y_size = img.size
f = open("p.png","wb")
for y in range(y_size):
for x in range(x_size):
r,g,b = img.getpixel((x,y))
f.write(bytearray([r,g,b]))
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment