Ejemplo n.º 1
0
        def analyze_state():
            # There might be errors that make us stop the process
            if self._error_stopped:
                msg = 'Multiple exceptions found while sending HTTP requests.'
                raise ScanMustStopException(msg)

            if self._user_stopped:
                msg = 'The user stopped the scan.'
                raise ScanMustStopByUserRequest(msg)
Ejemplo n.º 2
0
        def analyze_state():
            # This handles the case where the user pauses and then stops
            if self._user_stopped:
                # Raise the exception to stop the scan, this exception will be
                # raised all the time until we un-set the self._user_stopped
                # attribute
                msg = 'The user stopped the scan.'
                raise ScanMustStopByUserRequest(msg)

            # There might be errors that make us stop the process, the exception
            # was already raised (see below) but we want to make sure that we
            # keep raising it until the w3afCore really stops.
            if self._stop_exception is not None:
                # pylint: disable=E0702
                raise self._stop_exception