From fdbc323aa61750eb4f0259fdb3fffebde5ddb01b Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 24 Jan 2023 12:08:02 +0100 Subject: [PATCH] One more update for #5295 --- lib/core/settings.py | 2 +- lib/request/connect.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index f20420b07..e4de9fcb4 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from thirdparty import six from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.7.1.10" +VERSION = "1.7.1.11" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/request/connect.py b/lib/request/connect.py index 6c27a267e..da1bacad8 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -926,10 +926,11 @@ class Connect(object): errMsg += "function '%s' ('%s')" % (function.__name__, getSafeExString(ex)) raise SqlmapGenericException(errMsg) - if code in conf.abortCode: - errMsg = "aborting due to detected HTTP code '%d'" % code - singleTimeLogMessage(errMsg, logging.CRITICAL) - raise SystemExit + for _ in (getattr(conn, "redcode", None), code): + if _ is not None and _ in conf.abortCode: + errMsg = "aborting due to detected HTTP code '%d'" % _ + singleTimeLogMessage(errMsg, logging.CRITICAL) + raise SystemExit threadData.lastPage = page threadData.lastCode = code