from pwn import * import sys import re # Arg1: IP, Arg2: Port #io = process(['racket ../calculator-app.rkt']) try: io = remote(sys.argv[1], sys.argv[2]) except: print("Challenge not available") exit(1) print(io.recv(3)) io.sendline("flag") print(io.recvline()) res = io.recvline() print(res) if re.findall('FTCGI', str(res)): print("Found flag") exit(0) else: print("No flag found") exit(1)