示例#1
0
    def __init__(self, crawl_infrastructure_plugins, w3af_core,
                 max_discovery_time):
        """
        :param crawl_infrastructure_plugins: Instances of CrawlInfrastructure
                                             plugins in a list
        :param w3af_core: The w3af core that we'll use for status reporting
        :param max_discovery_time: The max time (in seconds) to use for the
                                   discovery phase
        """
        super(CrawlInfrastructure, self).__init__(crawl_infrastructure_plugins,
                                                  w3af_core,
                                                  thread_name=self.get_name(),
                                                  max_pool_queued_tasks=100)
        self._max_discovery_time = int(max_discovery_time)

        # For filtering fuzzable requests found by plugins:
        self._variant_db = VariantDB()

        self._disabled_plugins = set()
        self._running = True
        self._report_max_time = True
        self._reported_found_urls = ScalableBloomFilter()

        # Override BaseConsumer.in_queue in order to have an ordered queue for
        # our crawling process.
        #
        # Read OrderedCachedQueue's documentation to understand why order is
        # important
        self.in_queue = OrderedCachedQueue(maxsize=10,
                                           name=self.get_name() + 'In')
示例#2
0
    def __init__(self):
        CrawlPlugin.__init__(self)

        # Internal variables
        self._compiled_ignore_re = None
        self._compiled_follow_re = None
        self._broken_links = DiskSet()
        self._first_run = True
        self._known_variants = VariantDB()
        self._already_filled_form = ScalableBloomFilter()

        # User configured variables
        self._ignore_regex = ''
        self._follow_regex = '.*'
        self._only_forward = False
        self._compile_re()
示例#3
0
    def __init__(self):
        CrawlPlugin.__init__(self)

        # Internal variables
        self._compiled_ignore_re = None
        self._compiled_follow_re = None
        self._broken_links = DiskSet(table_prefix='web_spider')
        self._first_run = True
        self._target_urls = []
        self._target_domain = None
        self._already_filled_form = ScalableBloomFilter()
        self._variant_db = VariantDB()

        # User configured variables
        self._ignore_regex = ''
        self._follow_regex = '.*'
        self._only_forward = False
        self._compile_re()
示例#4
0
    def __init__(self, crawl_infrastructure_plugins, w3af_core,
                 max_discovery_time):
        """
        :param in_queue: The input queue that will feed the crawl_infrastructure plugins
        :param crawl_infrastructure_plugins: Instances of crawl_infrastructure plugins in a list
        :param w3af_core: The w3af core that we'll use for status reporting
        :param max_discovery_time: The max time (in seconds) to use for the discovery phase
        """
        super(crawl_infrastructure,
              self).__init__(crawl_infrastructure_plugins,
                             w3af_core,
                             thread_name='CrawlInfra')
        self._max_discovery_time = int(max_discovery_time)

        # For filtering fuzzable requests found by plugins:
        self._variant_db = VariantDB()
        self._already_seen_urls = ScalableBloomFilter()

        self._disabled_plugins = set()
        self._running = True
        self._report_max_time = True
示例#5
0
 def setUp(self):
     create_temp_dir()
     self.vdb = VariantDB()
示例#6
0
 def setUp(self):
     MiscSettings().set_default_values()
     create_temp_dir()
     self.vdb = VariantDB()