> For the complete documentation index, see [llms.txt](https://alham-rizvi.gitbook.io/alhamrizvi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alham-rizvi.gitbook.io/alhamrizvi/picoctf-writeups/picoctf/general-skills/1_wanna_b3_a_r0ck5tar.md).

# 1\_wanna\_b3\_a\_r0ck5tar

This challenge is basically: 👉 “Understand weird syntax → figure out what inputs it wants → get output → convert to ASCII → flag”

***

### 🎸 Step 1: Weird Rockstar = Normal Variables

Rockstar uses **poetry to store numbers**:

* Each word length = a digit
* Example:

  ```
  a six-string
  ```

  → "a" (1) + "six" (3) + "string" (6) = **136**

So:

* `A guitar is a six-string` → guitar = **136**
* `Tommy's been down` → "been" (4) → tommy = **4**
* `Music is a billboard-burning razzmatazz!` → word lengths = **1970**

***

### 🎧 Step 2: First Input

```
Listen to the music
If the music is a guitar
Say "Keep on rocking!"
```

Means:

```cpp
input1 = ?
if (input1 == 136)
    print "Keep on rocking!"
```

👉 So first input = **136**

***

### 🥁 Step 3: Second Input

```
Listen to the rhythm
If the rhythm without Music is nothing
```

Translate:

* "without" = subtraction
* "nothing" = 0

So:

```cpp
input2 - music == 0
```

We already know: 👉 music = **1970**

So:

```cpp
input2 - 1970 = 0
→ input2 = 1970
```

👉 Second input = **1970**

***

### 🔥 Step 4: What Happens Next?

After correct inputs:

* Program prints some numbers / encoded output
* That output = ASCII values

Convert those numbers → letters

👉 You get:

```
BONJOVI
```

***

### 🏁 Final Flag

```
picoCTF{BONJOVI}
```

***

### ⚡ TL;DR

* Rockstar = word lengths = numbers
* First input → **136**
* Second input → **1970**
* Output → ASCII decode → **BONJOVI**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://alham-rizvi.gitbook.io/alhamrizvi/picoctf-writeups/picoctf/general-skills/1_wanna_b3_a_r0ck5tar.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
