August 16, 2019
RedpwnCTF 2019 – Tux Trivia Show
Category : Misc Description : Win Tux Trivia Show!
nc chall2.2019.redpwn.net 6001
This challenge was not difficult but really annoying due to restrictive spelling.
It consists in a really large amount of question about capitals (country/usa’s states)
We create a simple text file containing the required data as follow:
Switzerland:Bern Germany:Berlin France:Paris ... ... ..
and then we made a script to answer the questions automatically:
#!/usr/bin/python3 from pwn import * import time r = remote("chall.2019.redpwn.net", 6001) while True: try: request=r.recvline(timeout=100).decode("utf-8") print(request) if "What is the capital of" in request: search= request[23:][:-2] +":" with open("capital.txt") as datas: for line in datas: if search in line: if str(line) == str(search) and str(line) == str(search): answer = line.split(":") print('answer: ',answer) r.send(answer) except: time.sleep(10) request = r.recvall().decode("utf-8") print(request) exit()