From 89d25a16cebda3fcf049dae4624128419debd89a Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 11 Mar 2021 11:11:29 +0100 Subject: [PATCH] Trivial patches --- lib/core/settings.py | 2 +- plugins/generic/connector.py | 8 ++++---- plugins/generic/databases.py | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index deb63bca0..384655509 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.5.3.10" +VERSION = "1.5.3.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/plugins/generic/connector.py b/plugins/generic/connector.py index 278e21b1a..865bf267e 100644 --- a/plugins/generic/connector.py +++ b/plugins/generic/connector.py @@ -63,20 +63,20 @@ class Connector(object): def connect(self): errMsg = "'connect' method must be defined " - errMsg += "into the specific DBMS plugin" + errMsg += "inside the specific DBMS plugin" raise SqlmapUndefinedMethod(errMsg) def fetchall(self): errMsg = "'fetchall' method must be defined " - errMsg += "into the specific DBMS plugin" + errMsg += "inside the specific DBMS plugin" raise SqlmapUndefinedMethod(errMsg) def execute(self, query): errMsg = "'execute' method must be defined " - errMsg += "into the specific DBMS plugin" + errMsg += "inside the specific DBMS plugin" raise SqlmapUndefinedMethod(errMsg) def select(self, query): errMsg = "'select' method must be defined " - errMsg += "into the specific DBMS plugin" + errMsg += "inside the specific DBMS plugin" raise SqlmapUndefinedMethod(errMsg) diff --git a/plugins/generic/databases.py b/plugins/generic/databases.py index 02a6d2fd2..256fd398a 100644 --- a/plugins/generic/databases.py +++ b/plugins/generic/databases.py @@ -594,7 +594,7 @@ class Databases(object): if conf.db is not None and len(kb.data.cachedColumns) > 0 \ and conf.db in kb.data.cachedColumns and tbl in \ kb.data.cachedColumns[conf.db]: - infoMsg = "fetched tables' columns on " + infoMsg = "fetched table columns from " infoMsg += "database '%s'" % unsafeSQLIdentificatorNaming(conf.db) logger.info(infoMsg) @@ -619,7 +619,7 @@ class Databases(object): query += condQuery if Backend.isFork(FORK.DRIZZLE): - query = query.replace("column_type", "data_type") + query = re.sub("column_type", "data_type", query, flags=re.I) elif Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2, DBMS.DERBY, DBMS.ALTIBASE, DBMS.MIMERSQL): query = rootQuery.inband.query % (unsafeSQLIdentificatorNaming(tbl.upper()), unsafeSQLIdentificatorNaming(conf.db.upper())) @@ -730,7 +730,7 @@ class Databases(object): if conf.db is not None and len(kb.data.cachedColumns) > 0 \ and conf.db in kb.data.cachedColumns and tbl in \ kb.data.cachedColumns[conf.db]: - infoMsg = "fetched tables' columns on " + infoMsg = "fetched table columns from " infoMsg += "database '%s'" % unsafeSQLIdentificatorNaming(conf.db) logger.info(infoMsg) @@ -1050,7 +1050,7 @@ class Databases(object): query = rootQuery.blind.count if Backend.isFork(FORK.DRIZZLE): - query = query.replace("INFORMATION_SCHEMA", "DATA_DICTIONARY") + query = re.sub("INFORMATION_SCHEMA", "DATA_DICTIONARY", query, flags=re.I) count = inject.getValue(query, union=False, error=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS) @@ -1078,7 +1078,7 @@ class Databases(object): query = rootQuery.blind.query % index if Backend.isFork(FORK.DRIZZLE): - query = query.replace("INFORMATION_SCHEMA", "DATA_DICTIONARY") + query = re.sub("INFORMATION_SCHEMA", "DATA_DICTIONARY", query, flags=re.I) value = unArrayizeValue(inject.getValue(query, union=False, error=False))