Python • Pwn
pwntools template
from pwn import *
context.binary = elf = ELF("./chall", checksec=False)
context.log_level = "info"
def start():
if args.REMOTE:
return remote("HOST", 1337)
return process(elf.path)
io = start()
# io.sendlineafter(b"> ", b"1")
# leak = u64(io.recvn(6).ljust(8, b"\x00"))
# log.info(f"leak = {hex(leak)}")
io.interactive()
Replace HOST/port and the IO flow.