$ cat writeup.md…
$ cat writeup.md…
metactf
Task: a web endpoint continuously streams printable junk mixed with indexed hex chunks that hide an image. Solution: extract the numbered hex records, rebuild the PNG, decode two QR layers, repair UTF-8-expanded bytes with latin1 re-encoding, then base64-decode the final payload.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
Source challenge:
Stomach BugURL:
https://stomachbug.umbccd.net
English summary: the endpoint returns an endless attachment named spew.txt. Inside the stream, useful data appears as numbered hex records mixed with distracting printable ASCII lines.
Recon observations:
spew.txt and keeps streaming.|000|... through |161|.....decode("utf-8").encode("latin1") before opening the nested image.Extraction pipeline:
.decode("utf-8").encode("latin1").#!/usr/bin/env python3 import base64 import io import re import requests from PIL import Image from pyzbar.pyzbar import decode URL = "https://stomachbug.umbccd.net" LINE_RE = re.compile(r"^\|(\d{3})\|([0-9a-fA-F]+)$") ...