Steganographyeasy
The Wire Between Words
by Pavel Knespl (capyplivl)
The file wire.txt is the Hacker Manifesto with irregular spacing between words. The gap run-lengths take only three values, which encode Morse signal and silence.
Solve
- Read
wire.txtand record the length of every run of spaces. All runs are 2, 3, or 4. - Map gap 2 to dot, gap 4 to dash, and gap 3 as the letter separator that flushes the current Morse letter.
- Decode each letter through a Morse table that includes punctuation, since Morse has no brace characters. The author used
.-.-.-(.) to open the brace and...-..-($) to close it;..--.-(_) separates words.
solve.py splits the text on triple-space letter separators, turns each remaining gap run into dot/dash, and looks the symbol up in a Morse table extended with the brace/underscore punctuation:
import re
MORSE = {
".-": "A", "-...": "B", "-.-.": "C", "-..": "D", ".": "E",
"..-.": "F", "--.": "G", "....": "H", "..": "I", ".---": "J",
"-.-": "K", ".-..": "L", "--": "M", "-.": "N", "---": "O",
".--.": "P", "--.-": "Q", ".-.": "R", "...": "S", "-": "T",
"..-": "U", "...-": "V", ".--": "W", "-..-": "X", "-.--": "Y",
"--..": "Z", "-----": "0", ".----": "1", "..---": "2", "...--": "3",
"....-": "4", ".....": "5", "-....": "6", "--...": "7", "---..": "8",
"----.": "9", ".-.-.-": "{", "...-..-": "}", "..--.-": "_",
}
text = open("wire.txt").read()
out = []
for chunk in re.split(r" {3}", text):
code = "".join("." if len(g) == 2 else "-" for g in re.findall(r" +", chunk))
if code:
out.append(MORSE.get(code, "?"))
print("".join(out))
python3 solve.py
The raw Morse decode is SVIBGR.M0RS3_C0D3_1S_C00L$ (the brace/underscore tokens already resolve via the extended table).
- Replace the leading
.with{and the trailing$with}.
Flag: SVIBGR{M0RS3_C0D3_1S_C00L}