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

Skip to content

Commit 1be7a5a

Browse files
committed
Fixes #4870
1 parent d0d4cf4 commit 1be7a5a

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty.six import unichr as _unichr
2121

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

lib/utils/sqlalchemy.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
from lib.core.exception import SqlmapMissingDependence
4040
from plugins.generic.connector import Connector as GenericConnector
4141
from thirdparty import six
42+
from thirdparty.six.moves import urllib as _urllib
4243

4344
def getSafeExString(ex, encoding=None): # Cross-referenced function
4445
raise NotImplementedError
@@ -50,6 +51,12 @@ def __init__(self, dialect=None):
5051
self.dialect = dialect
5152
self.address = conf.direct
5253

54+
if conf.dbmsUser:
55+
self.address = self.address.replace("%s:" % conf.dbmsUser, "%s:" % _urllib.parse.quote(conf.dbmsUser))
56+
57+
if conf.dbmsPass:
58+
self.address = self.address.replace(":%s@" % conf.dbmsPass, ":%s@" % _urllib.parse.quote(conf.dbmsPass))
59+
5360
if self.dialect:
5461
self.address = re.sub(r"\A.+://", "%s://" % self.dialect, self.address)
5562

0 commit comments

Comments
 (0)