コード例 #1
0
ファイル: output.py プロジェクト: CyberScions/droopescan
    def result(self, result, functionality):
        """
        For the final result of the scan.
        @param result: as returned by BasePluginInternal.url_scan
        @param functionality: functionality as returned by
            BasePluginInternal._general_init
        """
        for enumerate in result:

            # The host is a special header, we must not attempt to display it.
            if enumerate == "host" or enumerate == "cms_name":
                continue

            result_ind = result[enumerate]
            finds = result_ind['finds']
            is_empty = result_ind['is_empty']

            template_str = functionality[enumerate]['template']
            template_params = {
                    'noun': enumerate,
                    'Noun': enumerate.capitalize(),
                    'items': finds,
                    'empty': is_empty,
                }

            self.echo(template(template_str, template_params))
コード例 #2
0
ファイル: scan.py プロジェクト: CyberScions/droopescan
    def default(self):
        plugins = pu.plugins_base_get()
        opts = self._options(self.app.pargs)
        instances = self._instances_get(opts, plugins)

        if 'url_file' in opts:
            i = 0
            with open(opts['url_file']) as url_file:
                to_scan = {}
                for url in url_file:
                    url = url.strip()
                    found = False
                    for cms_name in instances:
                        inst_dict = instances[cms_name]
                        inst = inst_dict['inst']
                        vf = inst_dict['vf']
                        if inst.cms_identify(opts, vf, url) == True:
                            if cms_name not in to_scan:
                                to_scan[cms_name] = []

                            url = f.repair_url(url, self.out)
                            to_scan[cms_name].append(url)
                            found = True
                            break

                    if not found:
                        inst.out.warn("'%s' not identified as being a CMS we support." % url)

                    if i % 1000 == 0 and i != 0:
                       self._process_identify(opts, instances, to_scan)
                       to_scan = {}

                    i += 1

                if to_scan:
                    self._process_identify(opts, instances, to_scan)

        else:
           for cms_name in instances:
               inst_dict = instances[cms_name]
               inst = inst_dict['inst']
               vf = inst_dict['vf']

               url = f.repair_url(opts['url'], self.out)

               if inst.cms_identify(opts, vf, url) == True:
                   inst.out.echo(template("enumerate_cms.mustache",
                       {"cms_name": cms_name}))
                   inst.process_url(opts, **inst_dict['kwargs'])
コード例 #3
0
ファイル: output.py プロジェクト: camfindlay/droopescan
    def result(self, result, functionality):
        """
            For the final result of the scan.
            @param result as returned by BasePluginInternal.url_scan
        """
        for enumerate in result:

            # The host is a special header, we must not attempt to display it.
            if enumerate == "host":
                continue

            result_ind = result[enumerate]
            finds = result_ind['finds']
            is_empty = result_ind['is_empty']

            template_str = functionality[enumerate]['template']
            template_params = {
                    'noun': enumerate,
                    'Noun': enumerate.capitalize(),
                    'items': finds,
                    'empty': is_empty,
                }

            self.echo(template(template_str, template_params))
コード例 #4
0
ファイル: droopescan.py プロジェクト: CyberScions/droopescan
 def default(self):
     print(template("intro.mustache", {'version': version_get(),
         'color': True}))