From 08cb06fb65f03ad8e9f2edb1bf3543af962c7695 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 26 Oct 2021 10:19:42 +0200 Subject: [PATCH] Minor update for #4870 --- lib/core/common.py | 10 ++++++++-- lib/core/settings.py | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index ae6b44619..77d230abb 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1537,6 +1537,12 @@ def parseTargetDirect(): 'testdb' >>> conf.dbmsPass 'testpass' + >>> conf.direct = "mysql://user:'P@ssw0rd'@127.0.0.1:3306/test" + >>> parseTargetDirect() + >>> conf.dbmsPass + 'P@ssw0rd' + >>> conf.hostname + '127.0.0.1' >>> conf.direct = popValue() """ @@ -1553,8 +1559,8 @@ def parseTargetDirect(): conf.dbms = details.group("dbms") if details.group("credentials"): - conf.dbmsUser = details.group("user") - conf.dbmsPass = details.group("pass") + conf.dbmsUser = details.group("user").strip("'\"") + conf.dbmsPass = details.group("pass").strip("'\"") else: if conf.dbmsCred: conf.dbmsUser, conf.dbmsPass = conf.dbmsCred.split(':') diff --git a/lib/core/settings.py b/lib/core/settings.py index f028a2abb..a7f360ea5 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.5.10.18" +VERSION = "1.5.10.19" 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)