Last active
September 21, 2022 19:37
-
-
Save donno2048/d99241f17979decf9e79d34320c4728b to your computer and use it in GitHub Desktop.
the smallest possible "valid" png
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# as far as I know this is the smallest possible "valid" png | |
open("new.png", "wb").write(b'\x89PNG\r\n\x1a\n\0\0\0\rIHDR\0\0\0\1\0\0\0\1\1\0\0\0\x007n\xf9$\0\0\0\1IDAT0') | |
# I use it to hide files inside "photos" to send on platforms that won't send executable etc. like so: | |
open("new.png", "wb").write(b'\x89PNG\r\n\x1a\n\0\0\0\rIHDR\0\0\0\1\0\0\0\1\1\0\0\0\x007n\xf9$\0\0\0\xffIDAT' + open("./snake.com", "rb").read()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment