Description
I made a song. But some of it got turned into a flag. Can you decode the lyrics?
Setup
Download the lyrics file.
Identify the encoding scheme -- each word maps to a number.
Convert those numbers to ASCII to get the flag.
Solution
- Step 1Read the lyrics and recognize the patternOpen lyrics.txt. The song lyrics use standard music solfege note names: do, re, mi, fa, sol, la, si/ti. Each note maps to a digit: do=1, re=2, mi=3, fa=4, sol=5, la=6, si=7. Groups of notes separated by punctuation spell out numbers.
Learn more
Solfège is the system of syllables used to name musical scale degrees — do, re, mi, fa, sol, la, ti (or si). It dates to 11th-century monk Guido of Arezzo, who used syllables from a Latin hymn to teach pitch. It's the origin of "Do-Re-Mi" from The Sound of Music.
This challenge uses solfège as a substitution encoding — each syllable stands for a digit (1–7), and concatenated digits form decimal ASCII codes. This is a creative example of steganography: hiding a message inside something that looks innocuous (song lyrics) by establishing a mapping that only the sender and receiver know.
Recognizing the encoding scheme is the core skill here. CTF challenges often hide data in unusual encodings (Braille, semaphore flags, musical notation, color codes). The first step is always pattern recognition — asking "what system uses exactly these symbols?" The fixed set of 7 syllables mapping cleanly to digits 1–7 is the giveaway.
- Step 2Map notes to digits and convert to ASCIIEach line or phrase encodes one or two digits. Concatenate all digits to form a sequence of decimal ASCII codes, then convert each code to its character. Use Python to automate the conversion once you have the digit sequence.# After manually extracting the digit sequence from the lyrics:python3 -c "nums = [112,105,99,111,67,84,70,123,...]; print(''.join(chr(n) for n in nums))"
Learn more
ASCII (American Standard Code for Information Interchange) maps integers 0–127 to characters. Printable characters start at 32 (space) and the flag-relevant range is roughly 33–126.
chr(n)in Python converts an integer to its ASCII character;ord(c)does the reverse.The pattern here — encoding each character as its decimal ASCII value — appears in many CTF challenges and real obfuscation schemes. Knowing the ASCII table by heart for common ranges is a useful skill: lowercase 'a'–'z' is 97–122, uppercase 'A'–'Z' is 65–90, digits '0'–'9' are 48–57.
Python's
chr()and a list comprehension make this trivial to automate once you've extracted the numbers. For longer or more complex encodings, writing a short script is always faster than manual lookup — getting comfortable with quick Python one-liners is one of the highest-value skills in CTF work.
Flag
picoCTF{...}
The lyrics encode ASCII values via solfege note names (do=1 through si=7).