From e91b1a0f97fdb628501cccc29d081f96d15c1351 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 15 Mar 2022 21:52:05 +0100 Subject: [PATCH] Fixes #5032 --- lib/core/option.py | 9 +++++++++ lib/core/settings.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index aec32a0c2..70c839ea9 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1839,6 +1839,15 @@ def _cleanupOptions(): if conf.retries: conf.retries = min(conf.retries, MAX_CONNECT_RETRIES) + if conf.url: + match = re.search(r"\A(\w+://)?([^/@?]+)@", conf.url) + if match: + credentials = match.group(2) + conf.url = conf.url.replace("%s@" % credentials, "", 1) + + conf.authType = AUTH_TYPE.BASIC + conf.authCred = credentials if ':' in credentials else "%s:" % credentials + if conf.code: conf.code = int(conf.code) diff --git a/lib/core/settings.py b/lib/core/settings.py index 1953233b5..e59ad9bed 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.6.3.13" +VERSION = "1.6.3.14" 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)