1_wanna_b3_a_r0ck5tar picoCTF 2019 Solution

Published: April 2, 2026

Description

Solve the Rockstar program to find the flag.

Download the Rockstar program file.

bash
wget <url>/1_wanna_b3_a_r0ck5tar
  1. Step 1Understand the Rockstar programming language
    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
    npm install -g rockstar
    bash
    rockstar 1_wanna_b3_a_r0ck5tar
    Learn more

    Rockstar is a language where numeric literals are encoded by the lengths of words in a phrase. For example, 'my world' encodes 2 + 5 = 25 (counting letters). The language supports variables, arithmetic, conditionals, loops, and I/O - all through rock lyrics syntax.

    The official Rockstar interpreter can be installed via npm. Alternatively, the online interpreter at codewithrockstar.com/online runs programs in the browser.

  2. Step 2Analyze the program logic
    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' = 3 + 5 = 8. Each word contributes its letter count modulo 10 to the digits of the number, right-to-left.

  3. Step 3Run and read the flag
    Execute the Rockstar program. The flag will be printed as the output, or you may need to enter the correct input when prompted.
    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.

Flag

picoCTF{...}

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

Want more picoCTF 2019 writeups?

Useful tools for General Skills

What to try next