コード例 #1
0
    def make_queue(self):
        """
        Make work queue
        :return:
        """
        self.queue = FuzzerHeadersJob()
        generator = FileGenerator(self.options['urls-file'].value)

        self.queue.set_generator(generator)
        self.logger.log("Loaded {0} variants.".format(generator.lines_count))

        self.counter = WSCounter.factory(generator.lines_count)
コード例 #2
0
    def make_queue(self):
        """
        Make work queue
        :return:
        """
        self.queue = FuzzerUrlsJob()

        generator = FileGenerator(self.source_temp_file)
        self.queue.set_generator(generator)
        self.logger.log("Loaded {0} variants.".format(generator.lines_count))

        self.counter = WSCounter.factory(generator.lines_count)
コード例 #3
0
    def make_queue(self):
        self.queue = DafsJob()

        loaded = self.load_objects(self.queue)

        self.logger.log(
            "Loaded {0} words ({1}-{2}) from all {3}.".format(
                (loaded['end'] - loaded['start']), loaded['start'], loaded['end'], loaded['all'])
            if (int(self.options['parts'].value) and int(self.options['part'].value)) else
            "Loaded {0} words from source.".format(loaded['all'])
        )

        self.counter = WSCounter.factory(loaded['all'] if not loaded['end'] else loaded['end'] - loaded['start']
        )
コード例 #4
0
    def test_factory(self):
        Registry().set('config', {
            'main': {
                'counter_step': '1',
                'counter_steps_for_new_string': '2'
            }
        })

        counter = WSCounter.factory(3)

        assert 1 == counter.point
        assert 2 == counter.new_str
        assert 3 == counter.all

        assert int(time.time()) == counter.start_time
        assert int(time.time()) == counter.last_point_time
コード例 #5
0
    def make_queue(self):
        """
        Make work queue
        :return:
        """
        self.queue = ParamsBruterJob()

        loaded = self.load_objects(self.queue)

        self.logger.log("Loaded {0} words ({1}-{2}) from all {3}.".format((
            loaded['end'] - loaded['start']
        ), loaded['start'], loaded['end'], loaded['all']) if (
            int(self.options['parts'].value)
            and int(self.options['part'].value)
        ) else "Loaded {0} words from source.".format(loaded['all']))

        self.counter = WSCounter.factory(
            loaded['all'] if not loaded['end'] else loaded['end'] -
            loaded['start'])
        self.counter.point *= 10
        self.counter.new_str *= 10