Esempio n. 1
0
    def __init__(self):
        self.settings = opener_settings.OpenerSettings()
        self._opener = None

        # In exploit mode we disable some timeout/delay/error handling stuff
        self.exploit_mode = False

        # For error handling, the first "last response" is set to SUCCESS to
        # allow the _should_stop_scan method to match it's "SFFFF...FFF" pattern
        self._last_responses = deque(maxlen=MAX_RESPONSE_COLLECT)
        self._last_responses.extend([ResponseMeta(True, SUCCESS)] * 100)
        self._count_lock = threading.RLock()

        # For rate limiting
        self._rate_limit_last_time_called = 0.0
        self._rate_limit_lock = threading.RLock()

        # For timeout auto adjust and general stats
        self._total_requests = 0

        # Timeout is kept by host
        self._host_timeout = {}
        self._global_timeout = DEFAULT_TIMEOUT

        # Used in the pause on HTTP error feature to keep track of when the
        # core slept waiting for the remote end to be reachable
        self._sleep_log = {}
        self._clear_sleep_log()

        # User configured options (in an indirect way)
        self._grep_queue_put = None
        self._evasion_plugins = []
        self._user_paused = False
        self._user_stopped = False
        self._stop_exception = None
Esempio n. 2
0
    def __init__(self):
        self.settings = opener_settings.OpenerSettings()
        self._opener = None

        # For error handling
        self._last_request_failed = False
        self._last_errors = deque(maxlen=MAX_ERROR_COUNT)
        self._error_count = {}
        self._count_lock = threading.RLock()

        # User configured options (in an indirect way)
        self._grep_queue_put = None
        self._evasion_plugins = []
        self._user_paused = False
        self._user_stopped = False
        self._error_stopped = False
Esempio n. 3
0
    def __init__(self):
        self.settings = opener_settings.OpenerSettings()
        self._opener = None
        self._memory_usage_counter = 0
        self._non_targets = None

        # For error handling
        self._last_request_failed = False
        self._last_errors = deque(maxlen=10)
        self._error_count = {}
        self._count_lock = threading.RLock()

        # User configured options (in an indirect way)
        self._grep_queue_put = None
        self._evasion_plugins = []
        self._user_paused = False
        self._user_stopped = False
        self._error_stopped = False
        self._ignore_errors_conf = False