28 lines
443 B
Python
28 lines
443 B
Python
from pwn import *
|
|
import os
|
|
|
|
gs = '''
|
|
unset env LINES
|
|
unset env COLUMNS
|
|
set follow-fork-mode child
|
|
br *main
|
|
c
|
|
'''
|
|
|
|
elf = ELF(os.getcwd()+"/downunderflow")
|
|
|
|
def start():
|
|
if args.GDB:
|
|
return gdb.debug(elf.path, gs)
|
|
if args.REMOTE:
|
|
return remote("2023.ductf.dev", 30018)
|
|
else:
|
|
return process(os.getcwd()+"/downunderflow")
|
|
|
|
io = start()
|
|
|
|
print(io.recvuntil("Your turn: "))
|
|
io.send(cyclic(11))
|
|
|
|
|
|
io.interactive() |