# S.H.E.L.L CTF

## Check Flag - Rev \[50 pts] <a href="#check-flag" id="check-flag"></a>

> **Description**
>
> Was cleaning the junk out of my PC, when I found this really old executable. Help me look for the flag.

{% file src="/files/-MdrQTpS0J\_sCw-ZP8Va" %}
Check Flag
{% endfile %}

**Solution**

```
strings checkflag.exe | grep "SHELL{"
```

**Flag: SHELL{bas1c\_r3v}**

## Keygen - Category \[80 pts] <a href="#keygen" id="keygen"></a>

> Can you get the flag from the given file.

{% file src="/files/-Mg6oGrlaQkvzGghCYfR" %}
keygen.py
{% endfile %}

**Solution**

Taking all the parts to the code and putting them together into my code I could easily print out the flag.

```python
password = ['S', 'H' , 'E', 'L', 'L', '{', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']
password[28] = "}"
password[6] = "s"
password[7] = "3" 
password[8] = "n"
password[9] = "b"
password[10] = "0"
password[11] = "n"
password[12] = "z"
password[13] = "a"
password[14] = "k"
password[15] = "u"
password[16] = "r"
password[17] = "4"
password[18] = "_"
password[19] = "k"
password[20] = "4"
password[21] = "g"
password[23] = "y"
password[22] = "3"
password[24] =  "0"
password[25] = "5"
password[26] = "h"
password[27] = "1"
for i in password:
    print(i, end="")

print(password)
```

**Flag: SHELL{s3nb0nzakur4\_k4g3y05h1}**


---

# Agent Instructions: 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:

```
GET https://codingmace.gitbook.io/masterward/ctf/2021/shell-2021.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
