> For the complete documentation index, see [llms.txt](https://codingmace.gitbook.io/masterward/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codingmace.gitbook.io/masterward/ctf/2021/shell-2021.md).

# 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}**
