From 282eb7e533fcecef19f50be91ddf0161c5039dec Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 25 Jun 2020 13:48:50 +0200 Subject: [PATCH] Minor update related to the #4244 --- lib/core/settings.py | 2 +- plugins/dbms/db2/fingerprint.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index a7972eebd..479dfb33e 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.4.6.16" +VERSION = "1.4.6.17" 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/plugins/dbms/db2/fingerprint.py b/plugins/dbms/db2/fingerprint.py index 4bb198d0e..9daf69bcd 100644 --- a/plugins/dbms/db2/fingerprint.py +++ b/plugins/dbms/db2/fingerprint.py @@ -97,11 +97,20 @@ class Fingerprint(GenericFingerprint): logMsg = "confirming %s" % DBMS.DB2 logger.info(logMsg) - version = self._versionCheck() + result = inject.checkBooleanExpression("JULIAN_DAY(CURRENT DATE) IS NOT NULL") + if not result: + warnMsg = "the back-end DBMS is not %s" % DBMS.DB2 + logger.warn(warnMsg) + + return False + + version = self._versionCheck() if version: Backend.setVersion(version) setDbms("%s %s" % (DBMS.DB2, Backend.getVersion())) + else: + setDbms(DBMS.DB2) return True else: