@@ -154,7 +154,7 @@ def _getPageProxy(**kwargs):
154154 if (len(inspect.stack()) > sys.getrecursionlimit() // 2): # Note: https://github.com/sqlmapproject/sqlmap/issues/4525
155155 warnMsg = "unable to connect to the target URL"
156156 raise SqlmapConnectionException(warnMsg)
157- except TypeError:
157+ except ( TypeError, UnicodeError) :
158158 pass
159159
160160 try:
@@ -805,7 +805,7 @@ class _(dict):
805805 debugMsg = "got HTTP error code: %d ('%s')" % (code, status)
806806 logger.debug(debugMsg)
807807
808- except (_urllib.error.URLError, socket.error, socket.timeout, _http_client.HTTPException, struct.error, binascii.Error, ProxyError, SqlmapCompressionException, WebSocketException, TypeError, ValueError, OverflowError, AttributeError):
808+ except (_urllib.error.URLError, socket.error, socket.timeout, _http_client.HTTPException, struct.error, binascii.Error, ProxyError, SqlmapCompressionException, WebSocketException, TypeError, ValueError, OverflowError, AttributeError, OSError ):
809809 tbMsg = traceback.format_exc()
810810
811811 if conf.debug:
@@ -821,7 +821,7 @@ class _(dict):
821821 elif "no host given" in tbMsg:
822822 warnMsg = "invalid URL address used (%s)" % repr(url)
823823 raise SqlmapSyntaxException(warnMsg)
824- elif "forcibly closed" in tbMsg or " Connection is already closed" in tbMsg :
824+ elif any(_ in tbMsg for _ in ("forcibly closed", " Connection is already closed", "ConnectionAbortedError")) :
825825 warnMsg = "connection was forcibly closed by the target URL"
826826 elif "timed out" in tbMsg:
827827 if kb.testMode and kb.testType not in (None, PAYLOAD.TECHNIQUE.TIME, PAYLOAD.TECHNIQUE.STACKED):
0 commit comments