Example #1
0
    def get_queue(self):
        task_id = self.linenumber

        for resource in self.payload:
            if self.uppercase:
                resource = resource.upper()

            task_id += 1

            # Useful when looking for files without extension instead of directories
            if self.remove_slash and resource.endswith("/"):
                resource = resource[:-1]

            for extension in self.extensions:
                # If resource is a whole word and user didnt provide a extension
                # put a final /
                if not extension and not _has_extension(
                        resource) and not self.remove_slash:
                    resource += '/'

                # Put a . before extension if the users didnt do it
                if extension and not '.' in extension:
                    extension = '.' + extension

                task = Task(task_id, self.target, resource, extension)
                task.set_payload_filename(self.payload_filename)
                task.set_payload_length(self.length)
                task.set_banned_response_codes(self.banned_response_codes)
                task.set_unbanned_response_codes(self.unbanned_response_codes)
                task.set_content(self.content)
                self.queue.put(task)

        return self.queue
Example #2
0
    def get_queue(self):
        task_id = 0

        for resource in self.payload:
            if self.uppercase:
                resource = resource.upper()

            task_id += 1

            # Useful when looking for files without extension instead of directories
            if self.remove_slash and resource.endswith("/"):
                resource = resource[:-1]

            for extension in self.extensions:
                # If resource is a whole word and user didnt provide a extension
                # put a final /
                if not extension and not _has_extension(resource) and not self.remove_slash:
                    resource += '/'

                # Put a . before extension if the users didnt do it
                if extension and not '.' in extension:
                    extension = '.' + extension

                task = Task(task_id, self.target, resource, extension)
                task.set_payload_filename(self.payload_filename)
                task.set_payload_length(self.length)
                task.set_banned_response_codes(self.banned_response_codes)
                task.set_unbanned_response_codes(self.unbanned_response_codes)
                task.set_content(self.content)
                self.queue.put(task)

        return self.queue
Example #3
0
    def _feed_queue(self):
        for resource in self.payload:
            if self.only_alpha:
                if not resource.isalnum():
                    continue

            if self.uppercase:
                resource = resource.upper()

            if self.capitalize:
                resource = resource.capitalize()

            if self.strip_extension:
                resource = resource.split(".")[0]

            # Useful when looking for files without extension instead of directories
            if self.remove_slash and resource.endswith("/"):
                resource = resource[:-1]

            for extension in self.extensions:
                # If resource is a whole word and user didnt provide a extension
                # put a final /
                if (not extension and not _has_extension(resource)
                        and not self.remove_slash):
                    resource += "/"

                # Put a . before extension if the users didnt do it
                if extension and not "." in extension:
                    extension = "." + extension

                self.task_id += 1
                task = Task(self.task_id, self.target, resource, extension)
                task.set_payload_filename(self.payload_filename)
                task.set_payload_length(self.get_total_requests())
                task.set_banned_response_codes(self.banned_response_codes)
                task.set_unbanned_response_codes(self.unbanned_response_codes)
                task.set_content(self.content)
                self.queue.put(task)
                self.number_of_tasks += 1
Example #4
0
    def _feed_queue(self):
        for resource in self.payload:
            if self.only_alpha:
                if not resource.isalnum():
                    continue

            if self.uppercase:
                resource = resource.upper()

            if self.capitalize:
                resource = resource.capitalize()

            if self.strip_extension:
                resource = resource.split('.')[0]

            # Useful when looking for files without extension instead of directories
            if self.remove_slash and resource.endswith("/"):
                resource = resource[:-1]

            for extension in self.extensions:
                # If resource is a whole word and user didnt provide a extension
                # put a final /
                if not extension and not _has_extension(resource) and not self.remove_slash:
                    resource += '/'

                # Put a . before extension if the users didnt do it
                if extension and not '.' in extension:
                    extension = '.' + extension

                self.task_id += 1
                task = Task(self.task_id, self.target, resource, extension)
                task.set_payload_filename(self.payload_filename)
                task.set_payload_length(self.get_total_requests())
                task.set_banned_response_codes(self.banned_response_codes)
                task.set_unbanned_response_codes(self.unbanned_response_codes)
                task.set_content(self.content)
                self.queue.put(task)
                self.number_of_tasks += 1