From 29f09e235c4f37a74307f201d2883a202ce8f7a9 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 1 Dec 2023 11:26:52 +0100 Subject: [PATCH] Fixes #5576 --- lib/core/settings.py | 2 +- lib/utils/sqlalchemy.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 82447cff3..7bffbb654 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from thirdparty import six from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.7.11.3" +VERSION = "1.7.12.0" 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/lib/utils/sqlalchemy.py b/lib/utils/sqlalchemy.py index f1bc0d99d..685c45399 100644 --- a/lib/utils/sqlalchemy.py +++ b/lib/utils/sqlalchemy.py @@ -116,6 +116,10 @@ class SQLAlchemy(GenericConnector): def execute(self, query): retVal = False + # Reference: https://stackoverflow.com/a/69491015 + if hasattr(_sqlalchemy, "text"): + query = _sqlalchemy.text(query) + try: self.cursor = self.connector.execute(query) retVal = True