> 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/bytemancy-0.md).

# bytemancy 0

The challenge presents a Python script running on a remote server. It asks for "ASCII DECIMAL 101, 101, 101, side-by-side, no space." If the input matches the character representation of those numbers, the server provides the flag.

#### **The Logic**

In computer science, every character you type has a corresponding numerical value called an **ASCII code**. The script performs a comparison check:

```python
if user_input == "\x65\x65\x65":
    print(open("./flag.txt", "r").read())
```

* **`\x65`** is the Hexadecimal representation of the number **101**.
* According to the ASCII table, the decimal value **101** maps to the lowercase letter **`e`**.
* Therefore, the string `"\x65\x65\x65"` is equivalent to the string **`eee`**.

#### **The Solution**

1. **Connect** to the server using `nc candy-mountain.picoctf.net 62026`.
2. **Translate** the decimal values:
   * 101 = `e`
   * 101 = `e`
   * 101 = `e`
3. **Input** the string: `eee`
4. **Result**: The server validates the match and prints the flag.

#### **Key Takeaway**

ASCII is **case-sensitive**.

* Lowercase `e` is **101**.
* Uppercase `E` is **69**.

In CTF challenges, always double-check whether the prompt asks for Decimal, Hex, or Octal, as "101" means something different in each base!

**Flag:** `picoCTF{pr1n74813_ch4r5_9b465df3}`


---

# 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/bytemancy-0.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.
