$ cat writeup.md…
$ cat writeup.md…
tjctf
Task: grayscale PNG where RGB triplets were flattened into single grayscale pixels, with original dimensions hidden in EXIF Comment. Solution: read EXIF for original size, reshape flat grayscale data back into (H, W, 3) RGB array using NumPy.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
I was messing around with my image and it got really messed up... I see patterns...
Given: chall.png — a 1888×1888 8-bit grayscale PNG (~2.5 MB). The goal is to recover the original image and find the flag.
Running exiftool on the image reveals key metadata:
Image Width : 1888
Image Height : 1888
Color Type : Grayscale
Bit Depth : 8
Comment : 2000x594
The image is grayscale (mode 'L'), but the EXIF Comment field contains 2000x594 — the original image dimensions. This is the first critical clue.
The challenge name "triplets" hints at groups of three — specifically RGB color channels. Each pixel in the original RGB image has 3 values (R, G, B). The encoding process was:
The description "it got really messed up" and "I see patterns" confirms the image was transformed — the patterns are the interleaved R, G, B values appearing as grayscale stripes.
The reversal is straightforward:
...
$ grep --similar