From a9c3b59cffea761a735abdeca24388ef2251030f Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 9 Apr 2018 12:14:46 +0200 Subject: [PATCH] Update related to the #2999 --- lib/core/option.py | 11 ++++++++--- lib/core/settings.py | 2 +- txt/checksum.md5 | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index f7f213c98..23daf5761 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -918,7 +918,7 @@ def _setTamperingFunctions(): dirname, filename = os.path.split(script) dirname = os.path.abspath(dirname) - infoMsg = "loading tamper script '%s'" % filename[:-3] + infoMsg = "loading tamper module '%s'" % filename[:-3] logger.info(infoMsg) if not os.path.exists(os.path.join(dirname, "__init__.py")): @@ -932,7 +932,7 @@ def _setTamperingFunctions(): try: module = __import__(filename[:-3].encode(sys.getfilesystemencoding() or UNICODE_ENCODING)) except Exception, ex: - raise SqlmapSyntaxException("cannot import tamper script '%s' (%s)" % (filename[:-3], getSafeExString(ex))) + raise SqlmapSyntaxException("cannot import tamper module '%s' (%s)" % (filename[:-3], getSafeExString(ex))) priority = PRIORITY.NORMAL if not hasattr(module, "__priority__") else module.__priority__ @@ -962,7 +962,12 @@ def _setTamperingFunctions(): break elif name == "dependencies": - function() + try: + function() + except Exception, ex: + errMsg = "error occurred while checking dependencies " + errMsg += "for tamper module '%s' ('%s')" % (filename[:-3], getSafeExString(ex)) + raise SqlmapGenericException(errMsg) if not found: errMsg = "missing function 'tamper(payload, **kwargs)' " diff --git a/lib/core/settings.py b/lib/core/settings.py index e8c807fa3..5d345a650 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.2.4.7" +VERSION = "1.2.4.8" 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/txt/checksum.md5 b/txt/checksum.md5 index 1a86dc30a..b0b6740f4 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -40,13 +40,13 @@ cada93357a7321655927fc9625b3bfec lib/core/exception.py 1e5532ede194ac9c083891c2f02bca93 lib/core/__init__.py 458a194764805cd8312c14ecd4be4d1e lib/core/log.py c9a56e58984420a5abb7a3f7aadc196d lib/core/optiondict.py -b950c8c2f2ae87ad2ec99e1d19b2c03a lib/core/option.py +83345a6b0b7e187d2cbcc280a509f03e lib/core/option.py 7cfd04e583cca782b843f6f6d973981a lib/core/profiling.py 6f654e1715571eff68a0f8af3d62dcf8 lib/core/readlineng.py 0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py a7db43859b61569b601b97f187dd31c5 lib/core/revision.py fcb74fcc9577523524659ec49e2e964b lib/core/session.py -cc7aa83cd292f28d11782127d891256e lib/core/settings.py +f7a3dd2314df4d3bc09ae192558ff874 lib/core/settings.py 0dfc2ed40adf72e302291f6ecd4406f6 lib/core/shell.py a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py a35efa7bec9f1e6cedf17c9830a79241 lib/core/target.py