@@ -154,7 +154,7 @@ def _getPageProxy(**kwargs):
154
154
if (len (inspect .stack ()) > sys .getrecursionlimit () // 2 ): # Note: https://github.com/sqlmapproject/sqlmap/issues/4525
155
155
warnMsg = "unable to connect to the target URL"
156
156
raise SqlmapConnectionException (warnMsg )
157
- except TypeError :
157
+ except ( TypeError , UnicodeError ) :
158
158
pass
159
159
160
160
try :
@@ -805,7 +805,7 @@ class _(dict):
805
805
debugMsg = "got HTTP error code: %d ('%s')" % (code , status )
806
806
logger .debug (debugMsg )
807
807
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 ):
809
809
tbMsg = traceback .format_exc ()
810
810
811
811
if conf .debug :
@@ -821,7 +821,7 @@ class _(dict):
821
821
elif "no host given" in tbMsg :
822
822
warnMsg = "invalid URL address used (%s)" % repr (url )
823
823
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" )) :
825
825
warnMsg = "connection was forcibly closed by the target URL"
826
826
elif "timed out" in tbMsg :
827
827
if kb .testMode and kb .testType not in (None , PAYLOAD .TECHNIQUE .TIME , PAYLOAD .TECHNIQUE .STACKED ):
0 commit comments