Tags: crypto programming python 

Rating:

```
from pwn import *
from base64 import *
nc = remote('encoderbase.ctf.cert.unlp.edu.ar', 5001)
while True:
s = nc.recvline().decode().strip()
if 'flag' in s:
print(s)
break
if 'Encode next string' in s:
print(s)
f = s[-10:-1]
print(f)
s = nc.recvline().decode().strip()
print(s)
e = eval(f + '(' + "b'" + s + "'" + ')')
print(e)
nc.sendline(e)
s = nc.recvline().decode().strip()
print(s)
```
```
[x] Opening connection to encoderbase.ctf.cert.unlp.edu.ar on port 5001
[x] Opening connection to encoderbase.ctf.cert.unlp.edu.ar on port 5001: Trying 200.10.100.49
[+] Opening connection to encoderbase.ctf.cert.unlp.edu.ar on port 5001: Done
Encode next string with b16encode:
b16encode
goma
b'676F6D61'
Nice!
Encode next string with b32encode:
b32encode
disco
b'MRUXGY3P'
Nice!
Encode next string with b85encode:
b85encode
certeza
b'V`Xx5WqM%'
Nice!
Encode next string with b32encode:
b32encode
bruja
b'MJZHK2TB'
Nice!
...
...
...
Encode next string with b85encode:
b85encode
cupula
b'V|8$KY+('
Nice!
Encode next string with b85encode:
b85encode
gigante
b'XK80)Zggb'
Nice!
Genius!! The flag isflag{reality_is_a_consensus}
```
```
flag{reality_is_a_consensus}
```