Esempio n. 1
0
    def _from_txt_get_vulns(self):
        file_vulns = []
        vuln_regex = 'SQL injection in a .*? was found at: "(.*?)"' \
                     ', using HTTP method (.*?). The sent .*?data was: "(.*?)"'
        vuln_re = re.compile(vuln_regex)

        for line in file(self.OUTPUT_FILE):
            mo = vuln_re.search(line)

            if mo:
                v = MockVuln('TestCase', None, 'High', 1, 'plugin')
                v.set_url(URL(mo.group(1)))
                v.set_method(mo.group(2))

                file_vulns.append(v)

        return file_vulns
Esempio n. 2
0
    def _from_txt_get_vulns(self):
        file_vulns = []
        vuln_regex = 'SQL injection in a .*? was found at: "(.*?)"' \
                     ', using HTTP method (.*?). The sent .*?data was: "(.*?)"'
        vuln_re = re.compile(vuln_regex)

        for line in file(self.OUTPUT_FILE):
            mo = vuln_re.search(line)

            if mo:
                v = MockVuln('TestCase', None, 'High', 1, 'plugin')
                v.set_url(URL(mo.group(1)))
                v.set_method(mo.group(2))
                
                file_vulns.append(v)

        return file_vulns