From 4bf20066eca90a3da6d2c5314c70b97a256c0ef4 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 25 Jan 2018 12:29:56 +0100 Subject: [PATCH] Update related to the #2769 --- lib/core/settings.py | 2 +- lib/utils/sqlalchemy.py | 10 +++++++++- txt/checksum.md5 | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 6a4bbe402..b20c9bab3 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.2.1.16" +VERSION = "1.2.1.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/lib/utils/sqlalchemy.py b/lib/utils/sqlalchemy.py index 50f3d5cc8..ecbe9786a 100644 --- a/lib/utils/sqlalchemy.py +++ b/lib/utils/sqlalchemy.py @@ -41,6 +41,8 @@ class SQLAlchemy(GenericConnector): def connect(self): if _sqlalchemy: + import pdb + pdb.set_trace() self.initConnection() try: @@ -54,7 +56,13 @@ class SQLAlchemy(GenericConnector): if self.dialect: conf.direct = conf.direct.replace(conf.dbms, self.dialect, 1) - engine = _sqlalchemy.create_engine(conf.direct, connect_args={"check_same_thread": False} if self.dialect == "sqlite" else {}) + if self.dialect == "sqlite": + engine = _sqlalchemy.create_engine(conf.direct, connect_args={"check_same_thread": False}) + elif self.dialect == "oracle": + engine = _sqlalchemy.create_engine(conf.direct, connect_args={"allow_twophase": False}) + else: + engine = _sqlalchemy.create_engine(conf.direct, connect_args={}) + self.connector = engine.connect() except (TypeError, ValueError): if "_get_server_version_info" in traceback.format_exc(): diff --git a/txt/checksum.md5 b/txt/checksum.md5 index 30edc2ae4..7f9769f01 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -46,7 +46,7 @@ ffa5f01f39b17c8d73423acca6cfe86a lib/core/readlineng.py 0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py a7db43859b61569b601b97f187dd31c5 lib/core/revision.py fcb74fcc9577523524659ec49e2e964b lib/core/session.py -d623d7a3c0c977964f451ca20b0b15aa lib/core/settings.py +50a0f84801ca7dcc40fd3112320d3fe2 lib/core/settings.py d0adc28a38e43a787df4471f7f027413 lib/core/shell.py 63491be462c515a1a3880c27c2acc4a2 lib/core/subprocessng.py 505aaa61e1bba3c3d4567c3e667699e3 lib/core/target.py @@ -112,7 +112,7 @@ a6d6888e14a7c11f0884c8cc18489caa lib/utils/getch.py 5d6d73d27833eef1b10b9215629533ff lib/utils/progress.py 0ec5cec9d93d5ffd1eaeda6e942ecadf lib/utils/purge.py 4a6886d3a0c7bf768df97738fa257de9 lib/utils/search.py -3abe64e696ad75ad28cadf2695a58be8 lib/utils/sqlalchemy.py +d0c473a44e2967d9ba2af688d34b9194 lib/utils/sqlalchemy.py dcc25183c6bd85b172c87cfcbc305ab6 lib/utils/timeout.py e426eae9ddf6a42bcb6b7355e2c2936f lib/utils/versioncheck.py 1e9cf437451ff8147a372a002641b963 lib/utils/xrange.py