Rating:

The challenge provides a domain and port to connect to with `nc`. Upon connection, you are prompted to solve some simple math problems, but the timeout is too quick to reasonably do so manually. I wrote a script to evaluate each of the provided expressions.

```python
#!/usr/bin/env python3
from pwn import *

# the connection is terminated before a final newline, this prints the buffer contents
context.log_level = "debug"

conn = remote("calculator.ctf.cert.unlp.edu.ar", 15002)

conn.recvuntil(b":\n")

while True:
line = conn.recvline().strip()

try:
result = str(eval(line)).encode("utf-8")
except Exception:
print("COMPLETE")
while(True):
print(line)
line = conn.recvline()

conn.sendline(result)

print(conn.recvline())
```

I didn't write down the flag :p

Original writeup (https://nullcasa.github.io/ctf-metared-stage1-2022/).