> 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/picoctf/general.md).

# General Skills

### Obedient Cat \[5 pts]

> **Description**
>
> This file has a flag in plain sight (aka "in-the-clear"). [Download flag](https://mercury.picoctf.net/static/33996e32dce022205a6a36f69aba56f0/flag)

**Solution**

Open File

**Flag: picoCTF{s4n1ty\_v3r1f13d\_2aa22101}**

### Python Wrangling \[10 pts] \[Not Solved]

> **Description**
>
> Python scripts are invoked kind of like programs in the Terminal... Can you run [this Python script](https://mercury.picoctf.net/static/b351a89e0bc6745b00716849105f87c6/ende.py) using [this password](https://mercury.picoctf.net/static/b351a89e0bc6745b00716849105f87c6/pw.txt) to get [the flag](https://mercury.picoctf.net/static/b351a89e0bc6745b00716849105f87c6/flag.txt.en)?

**Solution**

a

**Flag:**&#x20;

### Wave a Flag \[10 pts]

> **Description**
>
> Can you invoke help flags for a tool or binary? [This program](https://mercury.picoctf.net/static/cfea736820f329083dab9558c3932ada/warm) has extraordinarily helpful information...

**Solution**

So many ways to do this problem but due to the low value I will go with the easiest one. So if you start and just run `./warm` It will print a `zsh: permission denied: ./warm`\
The command I use is `chmod +x warm` or you could use `chmod 777 warm` Either one works as it gives the file executable rights\
Now when we run `./warm` we get a message back asking us to pass -h\
To get the flag I ran the command `./warm -h`

**Flag: picoCTF{b1scu1ts\_4nd\_gr4vy\_30e77291}**

### Nice netcat... \[15 pts]

> **Description**
>
> &#x20;There is a nice program that you can talk to by using this command in a shell: `$ nc mercury.picoctf.net 35652`, but it doesn't speak English...

**Solution**

Running the given command in the terminal will return a lot of numbers. We can determine that it will start with pico so the correlation is `112 105 99 111` = `pico` and knowing from my programming it was ASCII. Wanting to put some to the test I created code to do the task for me instead of using an online converter.

*First I create and open a socket*

```python
import socket

hostname = "mercury.picoctf.net"
port = 35652

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Creates Socket
sock.connect((hostname, port)) # Connects
```

*Receiving and translating the code*

```python
def readall():
    global sock
    return sock.recv(100000) # Big number

def dumpall(s):
    flag = ''
    for line in s.split('\n'):
        flag += chr(int(line))
    return flag
    
res = readall().decode().strip()
print(dumpall(res))

sock.shutdown(socket.SHUT_WR) # Closing the connection
```

**Flag: picoCTF{g00d\_k1tty!\_n1c3\_k1tty!\_9b3b7392}**

### Static ain't always noise \[20 pts] \[Not Solved]

> **Description**
>
> &#x20;Can you look at the data in this binary: [static](https://mercury.picoctf.net/static/7495259e963bd5b67d0fb8b616652618/static)? This [BASH script](https://mercury.picoctf.net/static/7495259e963bd5b67d0fb8b616652618/ltdis.sh) might help!

**Solution**

a

**Flag:**&#x20;

### Tab, Tab, Attack \[20 pts] \[Not Solved]

> **Description**
>
> Using tabcomplete in the Terminal will add years to your life, esp. when dealing with long rambling directory structures and filenames: [Addadshashanammu.zip](https://mercury.picoctf.net/static/fe16c756149cfa85f23e73cd9dbd6a25/Addadshashanammu.zip)

**Solution**

a

**Flag:**&#x20;

### Magikarp Ground Mission \[30 pts] \[Not Solved]

> **Description**
>
> Do you know how to move between directories and read files in the shell? Start the container, `ssh` to it, and then `ls` once connected to begin. Login via `ssh` as `ctf-player` with the password, `b60940ca`

**Solution**

a

**Flag:**&#x20;
