Пример #1
0
def list_results(lst = os.path.join(os.path.expanduser("~"), "fimap_result.xml"), onlyExploitable=True):
    if (not os.path.exists(lst)):
        print "File not found! ~/fimap_result.xml"
        sys.exit(1)
    c = codeinjector(config)

    c.start(onlyExploitable)

    sys.exit(0)
Пример #2
0
def show_ip():
    print "Heading to 'http://85.214.72.67/show_my_ip'..."
    print "----------------------------------------------"
    tester = codeinjector(config)
    result = tester.doGetRequest("http://85.214.72.67/show_my_ip")
    if (result == None):
        print "result = None -> Failed! Maybe you have no connection or bad proxy?"
        sys.exit(1)
    print result.strip()
    sys.exit(0)
Пример #3
0
def list_results(lst=os.path.join(os.path.expanduser("~"), "fimap_result.xml"),
                 onlyExploitable=True):
    if (not os.path.exists(lst)):
        print("File not found! ~/fimap_result.xml")
        sys.exit(1)
    c = codeinjector(config)

    c.start(onlyExploitable)

    sys.exit(0)
Пример #4
0
def show_ip():
    print "Heading to 'http://85.214.72.67/show_my_ip'..."
    print "----------------------------------------------"
    tester = codeinjector(config)
    result = tester.doGetRequest("http://85.214.72.67/show_my_ip")
    if (result == None):
        print "result = None -> Failed! Maybe you have no connection or bad proxy?"
        sys.exit(1)
    print result.strip()
    sys.exit(0)
Пример #5
0
def list_results(lst=os.path.join(os.path.expanduser("~"),
                                  "fimap_result.xml")):
    if (not os.path.exists(lst)):
        print "File not found! ~/fimap_result.xml"
        sys.exit(1)
    c = codeinjector(config)

    c.start()

    sys.exit(0)
Пример #6
0
    def list_results(self, lst = os.path.join(os.path.expanduser("~"), "fimap_result.xml")):
        '''
        Method for show result form XML file.
        '''

        # If file already exists - exit
        # Otherwise create it.
        if (not os.path.exists(lst)):
            print "File not found! ~/fimap_result.xml"
            sys.exit(1)
        # Create instance of class codeinjector and pass the param
        c = codeinjector(self.mainconfig)
        # Call method start from Class codeinjector
        c.start()
        sys.exit(0)
Пример #7
0
    def show_ip(self):
        '''
        Method for shows information about IP address.
        '''

        print "Heading to 'http://85.214.27.38/show_my_ip'..."
        print "----------------------------------------------"
        # Create instance of class codeinjector and pass the param
        tester = codeinjector(self.mainconfig)
        # Call method doGetRequest from Class codeinjector
        result = tester.doGetRequest("http://85.214.27.38/show_my_ip")
        # If result is None - exit with code 1
        # else, split result and print it
        if (result == None):
            print "result = None -> Failed! Maybe you have no connection or bad proxy?"
            sys.exit(1)
        print result.strip()
        sys.exit(0)
Пример #8
0
                      
        if startExploiter:
            try:
                list_results(onlyExploitable=showOnlyExploitable)
            except KeyboardInterrupt:
                print "\n\nYou killed me brutally. Wtf!\n\n"
                sys.exit(0)

    except getopt.GetoptError, err:
        print (err)
        sys.exit(1)

    if (doUpdateDef):
        xmlconfig = config["XML2CONFIG"]
        tools = baseTools.baseTools()
        tester = codeinjector(config)
        print "Checking for definition file updates..."
        #print "Testing 'generic.xml'..."
        generic_xml_ver = xmlconfig.getVersion()
        
        # Get generic.xml from SVN repository and parse out its version.
        generic_xml_online = tester.doGetRequest(defupdateurl + "generic.xml")

        if generic_xml_online == None:
            print "Failed to check generic_xml. Are you online?"
        sys.exit(1)

        tmpFile = tempfile.mkstemp()[1] + ".xml"
        f = open(tmpFile, "w")
        f.write(generic_xml_online)
        f.close()
Пример #9
0
        if startExploiter:
            try:
                list_results(onlyExploitable=showOnlyExploitable)
            except KeyboardInterrupt:
                print("\n\nYou killed me brutally. Wtf!\n\n")
                sys.exit(0)

    except getopt.GetoptError as err:
        print(err)
        sys.exit(1)

    if (doUpdateDef):
        xmlconfig = config["XML2CONFIG"]
        tools = baseTools.baseTools()
        tester = codeinjector(config)
        print("Checking for definition file updates...")
        #print "Testing 'generic.xml'..."
        generic_xml_ver = xmlconfig.getVersion()

        # Get generic.xml from SVN repository and parse out its version.
        generic_xml_online = tester.doGetRequest(defupdateurl + "generic.xml")

        if generic_xml_online == None:
            print("Failed to check generic_xml. Are you online?")
        sys.exit(1)

        tmpFile = tempfile.mkstemp()[1] + ".xml"
        f = open(tmpFile, "w")
        f.write(generic_xml_online)
        f.close()