diff --git a/lib/core/common.py b/lib/core/common.py index 84da2215c..e3d59d4c6 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1681,10 +1681,14 @@ def parseTargetDirect(): for dbms in SUPPORTED_DBMS: details = re.search(r"^(?P%s)://(?P(?P.*?)\:(?P.*)\@)?(?P(?P[\w.-]+?)\:(?P[\d]+)\/)?(?P[\w\d\ \:\.\_~\-\/\\]*)$" % dbms, conf.direct, re.I) + # Note: database file path of a file-based DBMS (e.g. SQLite) can contain (almost) any character (e.g. '/tmp/my dir (old)/t.db') + if not details and dbms in DBMS_DICT[DBMS.SQLITE][0] + DBMS_DICT[DBMS.ACCESS][0]: + details = re.search(r"^(?P%s)://(?P.+)$" % re.escape(dbms), conf.direct, re.I) + if details: conf.dbms = details.group("dbms") - if details.group("credentials"): + if details.groupdict().get("credentials"): conf.dbmsUser = details.group("user").strip("'\"") conf.dbmsPass = details.group("pass").strip("'\"") else: @@ -1697,7 +1701,7 @@ def parseTargetDirect(): if not conf.dbmsPass: conf.dbmsPass = None - if details.group("remote"): + if details.groupdict().get("remote"): remote = True conf.hostname = details.group("hostname").strip() conf.port = int(details.group("port")) diff --git a/lib/core/settings.py b/lib/core/settings.py index 348d01282..4152cffa2 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.10.11.59" +VERSION = "1.10.11.60" 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)