diff --git a/lib/core/enums.py b/lib/core/enums.py index d71b2c76d..a07192ac6 100644 --- a/lib/core/enums.py +++ b/lib/core/enums.py @@ -194,6 +194,7 @@ class OPTION_TYPE: class HASHDB_KEYS: DBMS = "DBMS" + DBMS_FORK = "DBMS_FORK" CHECK_WAF_RESULT = "CHECK_WAF_RESULT" CONF_TMP_PATH = "CONF_TMP_PATH" KB_ABS_FILE_PATHS = "KB_ABS_FILE_PATHS" diff --git a/lib/core/settings.py b/lib/core/settings.py index 4bf470b8e..328e62e0b 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from lib.core.revision import getRevisionNumber # sqlmap version (...) -VERSION = "1.0.5.25" +VERSION = "1.0.5.26" REVISION = getRevisionNumber() STABLE = VERSION.count('.') <= 2 VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev") diff --git a/plugins/dbms/mysql/fingerprint.py b/plugins/dbms/mysql/fingerprint.py index c9db41244..a8f1c81cf 100644 --- a/plugins/dbms/mysql/fingerprint.py +++ b/plugins/dbms/mysql/fingerprint.py @@ -10,10 +10,13 @@ import re from lib.core.common import Backend from lib.core.common import Format from lib.core.common import getUnicode +from lib.core.common import hashDBRetrieve +from lib.core.common import hashDBWrite from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger from lib.core.enums import DBMS +from lib.core.enums import HASHDB_KEYS from lib.core.enums import OS from lib.core.session import setDbms from lib.core.settings import MYSQL_ALIASES @@ -103,8 +106,9 @@ class Fingerprint(GenericFingerprint): value += "back-end DBMS: " actVer = Format.getDbms() - if inject.checkBooleanExpression("@@USERSTAT LIKE @@USERSTAT"): - actVer += " (MariaDB fork)" + _ = hashDBRetrieve(HASHDB_KEYS.DBMS_FORK) + if _: + actVer += " (%s fork)" % _ if not conf.extensiveFp: value += actVer @@ -180,6 +184,9 @@ class Fingerprint(GenericFingerprint): return False + if hashDBRetrieve(HASHDB_KEYS.DBMS_FORK) is None: + hashDBWrite(HASHDB_KEYS.DBMS_FORK, inject.checkBooleanExpression("@@USERSTAT LIKE @@USERSTAT") and "MariaDB" or "") + # reading information_schema on some platforms is causing annoying timeout exits # Reference: http://bugs.mysql.com/bug.php?id=15855