From edba6a2a28be8d8c9f34ca98bbe0a1d7c8035599 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 7 May 2019 15:59:26 +0200 Subject: [PATCH] Minor beauty patch --- lib/core/common.py | 2 ++ lib/core/settings.py | 2 +- plugins/generic/connector.py | 9 +++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index cdce141ca..8b6e0f52f 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1441,6 +1441,8 @@ def parseTargetDirect(): for dbmsName, data in DBMS_DICT.items(): if dbmsName == conf.dbms or conf.dbms.lower() in data[0]: try: + conf.dbms = dbmsName + if dbmsName in (DBMS.ACCESS, DBMS.SQLITE, DBMS.FIREBIRD): if remote: warnMsg = "direct connection over the network for " diff --git a/lib/core/settings.py b/lib/core/settings.py index ec0a750c5..0d5f91452 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.3.5.36" +VERSION = "1.3.5.37" 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/plugins/generic/connector.py b/plugins/generic/connector.py index 77271ea9d..f80723564 100644 --- a/plugins/generic/connector.py +++ b/plugins/generic/connector.py @@ -30,12 +30,13 @@ class Connector: self.db = conf.dbmsDb def printConnected(self): - infoMsg = "connection to %s server %s" % (conf.dbms, self.hostname) - infoMsg += ":%d established" % self.port - logger.info(infoMsg) + if self.hostname and self.port: + infoMsg = "connection to %s server %s" % (conf.dbms, self.hostname) + infoMsg += ":%d established" % self.port + logger.info(infoMsg) def closed(self): - if self.hostname: + if self.hostname and self.port: infoMsg = "connection to %s server %s" % (conf.dbms, self.hostname) infoMsg += ":%d closed" % self.port logger.info(infoMsg)