26 lines
389 B
Python
26 lines
389 B
Python
from pwn import *
|
|
|
|
elf = ELF(os.getcwd() + "/web")
|
|
|
|
gs = '''
|
|
unset env LINES
|
|
unset env COLUMNS
|
|
set follow-fork-mode child
|
|
br *handle_conn+64
|
|
continue
|
|
'''
|
|
|
|
def start():
|
|
if args.GDB:
|
|
return gdb.debug([elf.path], gs=gs)
|
|
else:
|
|
return process([elf.path])
|
|
|
|
io = start()
|
|
sender = remote("localhost", 5000)
|
|
|
|
sender.send(cyclic(2000))
|
|
|
|
sender.interactive()
|
|
io.interactive()
|