#!/usr/bin/env python3 """CodeShell.kr - Quiet Frame (Stegano, 50p) solver. The payload is in the blue channel's LSB in row-major order, packed 8 bits MSB-first, terminated by a NUL byte. The stripes themselves contribute regular bits (0x55 / 0xAA), so the payload is the leading run of printable bytes. """ import numpy as np from PIL import Image
PNG = "assets/challenge-images/quiet-frame.png"
defmain(): a = np.array(Image.open(PNG).convert("RGB")) flat = (a[:, :, 2] & 1).flatten() # B channel LSB, row-major out = bytearray() for i inrange(0, len(flat) - 7, 8): v = 0 for bit in flat[i:i + 8]: v = (v << 1) | int(bit) out.append(v) print(out.split(b"\x00")[0].decode())