Tags: misc 

Rating:

```
#!/usr/bin/env python3
# @author: codaholikid

from pwn import *

host = '139.59.176.252'
port = 30923

r = remote(host, port)
r.recvuntil("> " )
r.sendline("1")

content = r.recv().decode().split("\n")[2] + r.recv().decode().split("\n")[0]
emoticons = content.split(" ")
first,second,third,fourth,fifth,sixth,seventh,eighth,ninth,tenth = emoticons[0],emoticons[3],emoticons[6],emoticons[9],emoticons[12],emoticons[15],emoticons[18],emoticons[21],emoticons[24], emoticons[27]
vfirst,vsecond,vthird,vfourth,vfifth,vsixth,vseventh,veighth,vninth,vtenth = emoticons[2],emoticons[5],emoticons[8],emoticons[11],emoticons[14],emoticons[17],emoticons[20],emoticons[23],emoticons[26],emoticons[29]

r.sendline("2")
out = r.recv().decode()
print(out)

c = 0
while c < 500:
question = out.split("\n")[5].split("=")[0].replace(first, vfirst).replace(second, vsecond).replace(third, vthird).replace(fourth, vfourth).replace(fifth ,vfifth).replace(sixth, vsixth).replace(seventh, vseventh).replace(eighth, veighth).replace(ninth, vninth).replace(tenth, vtenth)
r.sendline(str(eval(question)))
out = r.recv().decode()
print(out)
c += 1

Original writeup (https://hackmd.io/@codaholikid/cyberapocalypse-ctf-2021#First-Challenge-Alien-Camp).