Ejemplo n.º 1
0
    def _main( self, url ):
        '''
        This was taken from the original halberd, 'script/halberd' .
        '''
        scantask = halberd_scan_task.ScanTask()

        scantask.scantime = halberd_scan_task.default_scantime
        scantask.parallelism = halberd_scan_task.default_parallelism
        scantask.verbose = False
        scantask.debug = False
        scantask.conf_file = halberd_scan_task.default_conf_file
        scantask.cluefile = ''
        scantask.save = ''
        scantask.output = ''
        
        halberd_logger.setError()
        scantask.readConf()
        
        # UniScan
        scantask.url = url
        scantask.addr = ''
        scanner = halberd_shell.UniScanStrategy
        
        try:
            s = scanner(scantask)
        except halberd_shell.ScanError, msg:
            om.out.error('*** %s ***' % msg )
Ejemplo n.º 2
0
    def _main(self, url):
        """
        This was taken from the original halberd, 'script/halberd' .
        """
        scantask = halberd_scan_task.ScanTask()

        scantask.scantime = halberd_scan_task.default_scantime
        scantask.parallelism = halberd_scan_task.default_parallelism
        scantask.verbose = False
        scantask.debug = True
        scantask.conf_file = halberd_scan_task.default_conf_file
        scantask.cluefile = ''
        scantask.save = ''

        temp_output = tempfile.NamedTemporaryFile(delete=False,
                                                  dir=get_temp_dir(),
                                                  prefix='w3af-halberd-',
                                                  suffix='.output')
        scantask.out = temp_output.name

        halberd_logger.setError()
        try:
            scantask.readConf()
        except halberd_scan_task.ConfError, e:
            # halberd: 'unable to create a default conf. file'
            # https://github.com/andresriancho/w3af/issues/9988
            om.out.error('Failed to initialize Halberd configuration: "%s"' %
                         e)
            return
Ejemplo n.º 3
0
    def _main(self, url):
        """
        This was taken from the original halberd, 'script/halberd' .
        """
        scantask = halberd_scan_task.ScanTask()

        scantask.scantime = halberd_scan_task.default_scantime
        scantask.parallelism = halberd_scan_task.default_parallelism
        scantask.verbose = False
        scantask.debug = True
        scantask.conf_file = halberd_scan_task.default_conf_file
        scantask.cluefile = ''
        scantask.save = ''

        temp_output = tempfile.NamedTemporaryFile(delete=False)
        scantask.out = temp_output.name

        halberd_logger.setError()
        scantask.readConf()

        # UniScan
        scantask.url = url
        scantask.addr = ''
        scanner = CustomScanStrategy

        try:
            s = scanner(scantask)
        except halberd_shell.ScanError, msg:
            om.out.error('Halberd error: %s' % msg)
Ejemplo n.º 4
0
    def _main(self, url):
        """
        This was taken from the original halberd, 'script/halberd' .
        """
        scantask = halberd_scan_task.ScanTask()

        scantask.scantime = halberd_scan_task.default_scantime
        scantask.parallelism = halberd_scan_task.default_parallelism
        scantask.verbose = False
        scantask.debug = True
        scantask.conf_file = halberd_scan_task.default_conf_file
        scantask.cluefile = ''
        scantask.save = ''

        temp_output = tempfile.NamedTemporaryFile(delete=False)
        scantask.out = temp_output.name

        halberd_logger.setError()
        try:
            scantask.readConf()
        except halberd_scan_task.ConfError, e:
            # halberd: 'unable to create a default conf. file'
            # https://github.com/andresriancho/w3af/issues/9988
            om.out.error('Failed to initialize Halberd configuration: "%s"' % e)
            return
Ejemplo n.º 5
0
    def _main(self, url):
        """
        This was taken from the original halberd, 'script/halberd' .
        """
        scantask = halberd_scan_task.ScanTask()

        scantask.scantime = halberd_scan_task.default_scantime
        scantask.parallelism = halberd_scan_task.default_parallelism
        scantask.verbose = False
        scantask.debug = True
        scantask.conf_file = halberd_scan_task.default_conf_file
        scantask.cluefile = ''
        scantask.save = ''

        temp_output = tempfile.NamedTemporaryFile(delete=False)
        scantask.out = temp_output.name

        halberd_logger.setError()
        scantask.readConf()

        # UniScan
        scantask.url = url
        scantask.addr = ''
        scanner = CustomScanStrategy

        try:
            s = scanner(scantask)
        except halberd_shell.ScanError, msg:
            om.out.error('Halberd error: %s' % msg)