percent percent: url encoding, applied twice

huntress ctf 2026, day 30 · warmups · all three modes

tools used: decoding search engine and timed-attempt pipeline.

"that address bar problem? it happened twice." the address bar problem is percent-encoding, the %20 a browser shows for a space, and "twice" is the whole trick: the message was url-encoded, and the encoded text was url-encoded again, so every % of the first pass became %25. the single and the time trial were one such blob each; the mastery was a zip of a hundred and forty-eight blobs of thirty numbered lines whose last line was a chunk under the same double encoding.

the key insight is that one decode is not the end. after the first pass the text is still nothing but percent escapes, %4e%69%63..., which no reader would take for a message; only the second pass gives the sentence. a decoder that stops after one successful step, because the step "worked", hands back the middle layer.

challenge shape

single         1 field    the slug one blob's decoded text instructs
time trial     1 field    the same, a fresh blob
mastery      148 fields   one slug per blob, 148 blobs of 30 numbered lines

the field is message (setK.message in mastery): "decode the assigned blob completely. what exact answer slug does its final non-empty decoded line instruct you to submit?", answer kind pattern, three lowercase words and a two-digit number joined by hyphens.

artifact anatomy

the single's blob is 972 characters on one line, and the organizer escaped every byte, letters included, not only the characters a url must escape. that makes the layers easy to count: each pass turns one character into three, so 972 characters are 324 after one decode and 108 after two. a made-up example shows the shape:

"Hi"           -> every byte escaped    %48%69
"%48%69"       -> every byte escaped    %25%34%38%25%36%39

every third character of the blob is %, and every escape in it is %25, %3x or %6x: the percent sign, a digit or a lowercase hex letter of the inner layer, whose escapes are written in lowercase hex.

in the mastery each blob is NN<tab>chunk lines. line k is encoded by day k's encoding, from base64 on line 1 through rot13 over base64 on line 29; line 30 is a chunk of the message's tail under the double url encoding.

extraction method

by hand it is two calls of the standard library:

from urllib.parse import unquote

def decode(blob: str) -> str:
    return unquote(unquote(blob.strip()))

the decoding engine has a url step, and the breadth-first peel reaches the answer in two steps: url decoding is a one-step reading of any text that holds escapes, and its output holds nothing but escapes, so url decoding again is the obvious second step. the challenge name helped the order: "percent" is one of the engine's url hint words, so url readings were tried before the rest. the single's decode took 0.09 seconds.

for the mastery the line reader decoded lines 1 to 29 by their schedule rows and read line 30, past the schedule, by the search, which tries the chain that read the single first. on day 30 the schedule gained url>url as row 30, so the next mastery reads line 30 from the table.

validation and answer formatting

a reading counts when its text is printable and holds a slug of the asked shape: three lowercase dictionary words, a hyphen and two digits. one decode fails that check, since its output is a run of escapes with no words in it; a third decode changes nothing, since the sentence holds no %. the single's blob decoded to one sentence:

Nice work decoding this warmup! To solve, submit this exact answer to the Game Master: calm-prairie-ridge-16

the slug alone went to the grader, calm-prairie-ridge-16, and was accepted. the time trial's blob gave nimble-starfish-turtle-28; three of the mastery's blobs gave dandy-raven-maple-40 (set 1), funky-sailor-onyx-90 (set 10) and fancy-tent-clover-18 (set 100).

failed approaches and pivots

none on day 30: the first run of every mode found the reading.

automation across modes

the same reading answered every mode: 0.09 seconds on the single, about a millisecond on the time trial (the single's chain kept in-process) and 0.10 seconds for the mastery's hundred and forty-eight blobs.

lessons

solve times

public scoreboard · day 30 finish: below top 10

  • 0:03.1single#3 of 145 solvers
  • 0:06.0time trial#3 of 141 solvers
  • 0:09.1mastery#2 of 136 solvers
  • #14team day finishof 52 teams that cleared it, in 2h43m
  • #1single orderof the day's 7, 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 the mode's first attempt start to its flag (server times). attempts counts our solver runs.

mode work to flag attempts wrong submits
single 1.5s 1 0
time trial 0.6s 1 0
mastery 1.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 30.0s 0.6s 29.4s
mastery 165.0s 1.3s 163.7s

where we got stuck

flags: single, time trial, and mastery [redacted].

{generated by a clanker}