def frontpage_service_listing(name):
        headers = {
                'MIME-Version': '4.0',
                'User-Agent': 'MSFrontPage/4.0',
                'X-Vermeer-Content-Type': 'application/x-www-form-urlencoded',
                'Connection': 'Keep-Alive'}

        service_target_list = ['_vti_bin/shtml.exe/_vti_rpc','_vti_bin/shtml.dll/_vti_rpc']
        data=['method=list+services:3.0.2.1076&service_name=','method=list+services:4.0.2.471&service_name=','method=list+services:4.0.2.0000&service_name=','method=list+services:5.0.2.4803&service_name=','method=list+services:5.0.2.2623&service_name=','method=list+services:6.0.2.5420&service_name=']

        for item in service_target_list:
                destination = name + "/" + item

        print "[+] Sending HTTP POST request to retrieve service listing  - (%s)" %destination
        try:
            for entry in data:
                req = urllib2.Request(destination,entry,headers)
                response = urllib2.urlopen(req)
                if response.getcode() == 200:
                        print "[+] target accepts the request - (%s) | (%s) !" % (entry, response.getcode())
                        filename = "__service-list__.txt" + entry + ".html"
                        service_list = open(filename, 'a')
                        service_list.write(response.read())
                        print "[+] check file for contents - (%s) \n" %filename
                else:
                        print "[-] target fails to accept request - (%s) | (%s) !\n" %(data,response.getcode())

        except urllib2.URLError as e:
                print "[-] url error, seems like authentication is required or server failed to handle request! - - %s" % e.code
                pass

        except httplib.BadStatusLine:
                print "[-] server responds with bad status !"
                pass

        print "[*] ---------------------------------------------------------------------------------------"
dataset/ETHPy150Open alias1/sparty/sparty_v_0.1.py/frontpage_service_listing/original