From 186b3920e7dfa328805c59bff5dc88e9707a7b53 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 27 Jan 2020 23:47:47 +0100 Subject: [PATCH] Adding support for Percona (MySQL) fork --- lib/core/enums.py | 1 + lib/core/settings.py | 2 +- plugins/dbms/mysql/fingerprint.py | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/core/enums.py b/lib/core/enums.py index 8e31e6fa0..4f22cf412 100644 --- a/lib/core/enums.py +++ b/lib/core/enums.py @@ -76,6 +76,7 @@ class DBMS_DIRECTORY_NAME(object): class FORK(object): MARIADB = "MariaDB" MEMSQL = "MemSQL" + PERCONA = "Percona" COCKROACHDB = "CockroachDB" TIDB = "TiDB" diff --git a/lib/core/settings.py b/lib/core/settings.py index b4848faf7..129312eb0 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.1.57" +VERSION = "1.4.1.58" 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/mysql/fingerprint.py b/plugins/dbms/mysql/fingerprint.py index da0d890b2..ca4914132 100644 --- a/plugins/dbms/mysql/fingerprint.py +++ b/plugins/dbms/mysql/fingerprint.py @@ -92,6 +92,8 @@ class Fingerprint(GenericFingerprint): fork = FORK.MARIADB elif inject.checkBooleanExpression("VERSION() LIKE '%TiDB%'"): fork = FORK.TIDB + elif inject.checkBooleanExpression("@@VERSION_COMMENT LIKE '%Percona%'"): + fork = FORK.PERCONA else: fork = ""