Skip to main content

1_wanna_b3_a_r0ck5tar picoCTF 2019 Solution

Understand and trace a program written in an unconventional esoteric programming language to find the flag.

Published: April 2, 2026Updated: August 13, 2026

Description

Solve the Rockstar program to find the flag.

Download the Rockstar program file.

bash
wget <url>/1_wanna_b3_a_r0ck5tar

Solution

Want to try it yourself first?

The guided walkthrough reveals hints one step at a time.

Walk me through it
  1. Step 1Understand the Rockstar programming language
    Observation
    The file reads like song lyrics: poetic variable names and natural-language operators such as 'Put', 'Build', and 'Knock'. The title spells Rockstar in leet. This is valid source in the Rockstar esoteric language, which needs its own interpreter.
    The provided file is written in Rockstar, an esoteric programming language designed to look like rock ballad song lyrics. Variable names are poetic phrases and operations use words like 'Put', 'Let', 'Build', 'Knock'. Run it with a Rockstar interpreter.
    bash
    git clone https://github.com/RockstarLang/rockstar
    bash
    npm --prefix rockstar/satriani install
    bash
    node rockstar/satriani/rockstar 1_wanna_b3_a_r0ck5tar

    Expected output

    66
    79
    78
    74
    79
    86
    73
    What didn't work first

    Tried: Open the file in a text editor and try to run it as a Bash or Python script, assuming the song-lyric formatting is obfuscated shell or Python code.

    Bash and Python reject nearly every line, because Rockstar keywords like 'Put', 'Build', and 'Knock' mean nothing to them. The file is valid Rockstar and valid in no mainstream language. Identify the esolang from its poetic variable names and word-count number encoding, then use a real Rockstar interpreter.

    Tried: Install the Rockstar npm package globally with 'npm install -g rockstar' instead of cloning the satriani interpreter from the RockstarLang/rockstar repository.

    The npm package called 'rockstar' is an unrelated placeholder, not a language interpreter, so running it gives an error or nothing at all. The real interpreter is satriani from the official RockstarLang/rockstar repo, installed with 'npm --prefix rockstar/satriani install' and run via 'node rockstar/satriani/rockstar'.

    Learn more

    Rockstar is a language where numeric literals are encoded by the lengths of words in a phrase: each word contributes one digit equal to its letter count mod 10, read left to right. For example, 'my world' encodes the digits 2 then 5, giving the number 25. The language supports variables, arithmetic, conditionals, loops, and I/O - all through rock lyrics syntax.

    The official Rockstar interpreter (satriani) can be installed by cloning the RockstarLang/rockstar repository and running npm install in the satriani subdirectory. Alternatively, the online interpreter at codewithrockstar.com/online runs programs in the browser.

  2. Step 2Analyze the program logic
    Observation
    The interpreter prints a run of decimal numbers (66, 79, 78, 74, 79, 86, 73) rather than a flag, so those are ASCII values waiting to be decoded. Reading the source for its input prompts and print statements shows what the program expects.
    If the interpreter output does not give the flag directly, read through the Rockstar code manually. Look for print/output statements and trace the values being output. The flag may require providing specific input.
    Learn more

    Key Rockstar syntax: Say X / Shout X = print X. Put X into Y = assignment. Build X up = increment. Knock X down = decrement. While X is Y = while loop. If X is Y = conditional.

    Number encoding: 'Nothing' = 0, 'the stars' = digits 3 then 5 = 35. Each word contributes its letter count modulo 10 as one digit of the number, read left-to-right.

  3. Step 3Run and read the flag
    Observation
    The program reads input and gates its output behind conditionals. The seven ASCII values printed (66, 79, 78, 74, 79, 86, 73) spell B, O, N, J, O, V, I. So supply the right inputs to trigger the output, then convert the codes back to text.
    Execute the Rockstar program. When prompted for input, enter 10 for the first prompt and 170 for the second. The program then prints decimal ASCII values (66 79 78 74 79 86 73) which spell out BONJOVI, giving the flag.
    Learn more

    Esoteric programming languages (esolangs) like Rockstar, Brainfuck, Piet, and Whitespace are used in CTF challenges to test code-reading skills. The challenge is not the algorithm complexity but understanding an unfamiliar syntax. Reading the language specification is usually faster than trying to guess the behavior.

Interactive tools
  • Base64 & Base32 DecoderDecode Base64 and Base32 strings with auto-detection. Multi-layer mode unwraps nested encodings automatically.
  • Recipe ChainStack decoders into a pipeline: Base64, hex, ROT, XOR, Morse, URL, Atbash, Vigenère, and more. Magic mode auto-discovers the chain. Bookmark the URL to save it.
  • Number Base ConverterConvert numbers between binary, octal, decimal, and hexadecimal instantly. Enter any value and see all four bases update in real time.

Flag

Reveal flag

picoCTF{BONJOVI}

Run the Rockstar source file through a Rockstar interpreter to get the flag output.

Key takeaway

Esoteric languages hide computation in non-obvious syntax, so the job is finding the right interpreter rather than reading the logic yourself. The skill being tested is identifying a language from its surface features, like poetic variable names and natural-language operators, then tracking down tools for it. That transfers to any CTF or malware case where the code is written in something unusual, from Brainfuck to Whitespace to Piet.

Related reading

Useful tools for General Skills

Where to go next