#!/usr/bin/python

from pwn import *

def main():
    # start a process
    p = process("./lab4")

    # create payload

    #   1. Trigger Buffer overflow
    payload = "PUT YOU PAYLOAD HERE"

    #   2. Find System() and "/bin/sh" address in libc

    #   3. combine and formulate payload

    # send the payload to the binary
    p.send(payload)

    # pass interaction bac to the user
    p.interactive()

if __name__ == "__main__":
    main()

