Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ky28059/fdf7379fc3c90ee601f38bff211ab8eb to your computer and use it in GitHub Desktop.
Save ky28059/fdf7379fc3c90ee601f38bff211ab8eb to your computer and use it in GitHub Desktop.

m0leCon Beginner CTF 2024 — PIETcture

Paint by Numbers? Or perhaps, compute by pixels?

We're given an image that looks like this:

PIETcture

Based on the challenge name, this is a program written in the esolang Piet. Then, we can import the program into an online Piet IDE and try running it:

Based on the output, it looks like the given program is a flag checker. Because Piet is a stack-based language, we can assume that the flag will be on the stack; stepping through the instructions until the first output,

image

[0,125,116,115,49,116,114,52,95,110,52,95,51,109,48,99,51,98,95,51,118,52,104,95,100,108,117,48,104,115,95,49,123,109,116,112,80,4,4]

we get the flag:

image

ptm{1_sh0uld_h4v3_b3c0m3_4n_4rt1st}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment