Пример #1
0
    def output_json(self, filename):
        file = file_helper(filename)
        output = dict()
        output['Target'] = self.scanner.target
        output['Base Host'] = self.scanner.base_host
        output['Port'] = self.scanner.port
        output['Real Port'] = self.scanner.real_port
        output['Ignore HTTP Codes'] = self.scanner.ignore_http_codes
        output['Ignore Content Length'] = self.scanner.ignore_content_length
        output['Wordlist'] = self.scanner.wordlist
        output['Unique Depth'] = self.scanner.unique_depth
        output['SSL'] = self.scanner.ssl
        output['Start Time'] = '{} {}'.format(
            time.strftime("%d/%m/%Y"),
            time.strftime("%H:%M:%S")
        )

        result = dict()
        for host in self.scanner.hosts:
            headers = dict()
            for header in host.keys:
                headers[header.split(':')[0]] = header.split(':')[1].strip()

            result[host.hostname] = {
                'Code': host.response_code,
                'Hash': host.hash,
                'Headers': headers
            }

        output['Result'] = result

        if not file.is_json(output):
            print("[!] Json format check failed")

        file.write_file(json.dumps(output, indent=2))
Пример #2
0
    def write_grepable(self, filename):
        file = file_helper(filename)

        output = self.generate_header()
        output += self.output_grepable_detail()

        file.write_file(output)
Пример #3
0
    def write_normal(self, filename):
        file = file_helper(filename)

        output = self.generate_header()
        output += self.output_normal_likely()

        if(self.arguments.fuzzy_logic):
            output += self.output_fuzzy()

        output += self.output_normal_detail()
        file.write_file(output)
Пример #4
0
    def write_normal(self, filename):
        file = file_helper(filename)

        # todo: finish check_directory (needs regex to split out filename)
        # file.check_directory(filename)

        output = self.generate_header()
        output += self.output_normal_likely()

        if(self.arguments.fuzzy_logic):
            output += self.output_fuzzy()

        output += self.output_normal_detail()

        file.write_file(output)