eight is enough: octal byte values and a line decoder that already knew them
huntress ctf 2026, day 6 · warmups · all three modes
tools used: decoding engine and timed-attempt pipeline.
day 6 kept the warmup contract of days 1-5: a text blob whose decoded prose ends in a word-word-word-NN slug. "someone counted on eight fingers" pointed at the new representation: one line of space-separated three-digit octal numbers, one number per byte.
the key insight is that octal was already a registered transformation. it had been added as a guess on day 4, so the day-5 solver read the day-6 blob on its first run.
challenge shape
each set delivered one text artifact and asked for one field, message. the single and the time trial were one blob each. mastery packed 28 sets into one attempt (a zip of blob-NN.txt members), and its blobs carried six numbered lines, line k in day k's encoding: the five representations of earlier days (base64, rot13, hex, binary groups, decimal) plus the new octal line, which holds the end of the slug.
artifact anatomy
every token is exactly three digits from 0 to 7, so the space character is 040 and lowercase letters live between 141 and 172:
150 151 041 -> "hi!"
the fixed width is a convention of the generator, not of octal. the decoder accepts one to three digits per token so it does not depend on the padding.
extraction method
def _ints(text, base, digits):
toks = [t for t in re.split(r"[\s,;|:-]+", text.strip()) if t]
if len(toks) < 2 or any(not re.fullmatch(digits, t) for t in toks):
raise ValueError("not a number list")
vals = [int(t, base) for t in toks]
if any(v > 255 for v in vals):
raise ValueError("not bytes")
return vals
def octal(text):
return as_text(bytes(_ints(text.replace("\\", " "), 8, r"[0-7]{1,3}")))
for a single blob the breadth-first search tries every registered transform and stops at the first layer whose last non-empty line holds a slug and whose text scores as english. for mastery's numbered lines each line is decoded on its own, in a fixed order of candidate codecs, and the lines are joined in their numbered order.
validation and answer formatting
the trap is that every octal token is also a valid decimal token: 116 is N in octal and t in decimal, and both decodes produce bytes. two rules keep them apart:
- in the numbered-line order, octal is tried before decimal, and a decimal line almost always contains an
8or9somewhere, which the octal pattern rejects. - every candidate decode must be readable text before it is accepted. octal lowercase letters run from
141to172, and as decimal values most of those are above 127, so a decimal reading of an octal line fails that check.
the slug is copied as it appears on the last decoded line.
failed approaches and pivots
none. the representation had been prepared before it was asked.
automation across modes
the same find_slug call answered all three modes: the whole-blob search for the single and the time trial, and the numbered-line decoder for mastery's 28 sets, which took under a second of the seven-second clock.
lessons
- a decoder that accepts every number base needs an explicit rule for choosing between readings; for digit lists the cheap one is "decodes to printable text".
- preparing the obvious next representation the day before is cheap and won this day at release.
solve times
public scoreboard · day 6 finish: 1st
- 0:01.9singlefirst blood, +0.24 s
- 0:04.0time trialfirst blood, +5.8 s
- 0:07.1masteryfirst blood, +9.5 s
- #1team day finishof 182 teams that cleared it, in 1:45.7
- #1single orderof the day's 5, by our flag time
from the public scoreboard: 09:00 et release to our flag; the table below counts from our attempt's start.
from when we started working on the mode to its flag.
| mode | work to flag | attempts | wrong submits |
|---|---|---|---|
| single | 1s | 1 | 0 |
| time trial | 3s | 1 | 0 |
| mastery | 3s | 1 | 0 |
the clock
server timer of the winning attempt; used is attempt start to flag, left is what remained on the clock.
| mode | time available | time used | time left |
|---|---|---|---|
| time trial | 6.0s | 1.0s | 5.0s |
| mastery | 7.0s | 1.7s | 5.3s |
where we got stuck
- nowhere. the only cost was mastery's 28 sets: decoding them took most of the 1.7s the attempt used.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}