Skip to content

Commit afdaba7

Browse files
committed
Potential fix for #5134
1 parent d98d645 commit afdaba7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty.six import unichr as _unichr
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.6.6.10"
23+
VERSION = "1.6.6.11"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/request/connect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)