> For the complete documentation index, see [llms.txt](https://writeups.ayweth20.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://writeups.ayweth20.com/2022/404ctf/misc/pierre-papier-hallebarde.md).

# Pierre-papier-Hallebarde

**Category:** Miscellaneous - **Points:** 100 - **Difficulty:** Intro - **Solves:** 274

**Description:**

**Hallebarde** a mis en place sa variante du Pierre-papier-ciseaux. À ce jour, personne de nos services n'est parvenu à vaincre l'ordinateur. Montrez-leur de quoi vous êtes capable en récupérant leur précieux flag.txt !\
`nc challenge.404ctf.fr 30806`

**Solution:**

To solve this challenge, you need to find a method to bypass the *robot* who always win.\
![image](https://user-images.githubusercontent.com/91023285/174305633-48586b8f-b5f9-4ab8-b73a-bd43a4d6ef3c.png)

So to do that, you need to exploit a flaw in the python script and enter the following command to display the flag contained in the *flag.txt* file: `input(open("flag.txt", "r").read())`\
![image](https://user-images.githubusercontent.com/91023285/174305772-94504a70-3a00-46ca-bf52-fec8e96b728f.png)

<details>

<summary>🚩 FLAG</summary>

```
404CTF{cH0iX_nUm3r0_4_v1c701r3}
```

</details>


---

# 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://writeups.ayweth20.com/2022/404ctf/misc/pierre-papier-hallebarde.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.
