Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit edba6a2

Browse files
committed
Minor beauty patch
1 parent 74c7cf9 commit edba6a2

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

lib/core/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,6 +1441,8 @@ def parseTargetDirect():
14411441
for dbmsName, data in DBMS_DICT.items():
14421442
if dbmsName == conf.dbms or conf.dbms.lower() in data[0]:
14431443
try:
1444+
conf.dbms = dbmsName
1445+
14441446
if dbmsName in (DBMS.ACCESS, DBMS.SQLITE, DBMS.FIREBIRD):
14451447
if remote:
14461448
warnMsg = "direct connection over the network for "

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty import six
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.5.36"
21+
VERSION = "1.3.5.37"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

plugins/generic/connector.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ def initConnection(self):
3030
self.db = conf.dbmsDb
3131

3232
def printConnected(self):
33-
infoMsg = "connection to %s server %s" % (conf.dbms, self.hostname)
34-
infoMsg += ":%d established" % self.port
35-
logger.info(infoMsg)
33+
if self.hostname and self.port:
34+
infoMsg = "connection to %s server %s" % (conf.dbms, self.hostname)
35+
infoMsg += ":%d established" % self.port
36+
logger.info(infoMsg)
3637

3738
def closed(self):
38-
if self.hostname:
39+
if self.hostname and self.port:
3940
infoMsg = "connection to %s server %s" % (conf.dbms, self.hostname)
4041
infoMsg += ":%d closed" % self.port
4142
logger.info(infoMsg)

0 commit comments

Comments
 (0)