mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
From now on --dbms-cred can be used also in combination with -d (more flexibility as spotted that one user used in that way on ML)
This commit is contained in:
parent
feed2274c3
commit
2defc30dc6
|
@ -1058,8 +1058,11 @@ def parseTargetDirect():
|
||||||
conf.dbmsUser = details.group('user')
|
conf.dbmsUser = details.group('user')
|
||||||
conf.dbmsPass = details.group('pass')
|
conf.dbmsPass = details.group('pass')
|
||||||
else:
|
else:
|
||||||
conf.dbmsUser = unicode()
|
if conf.dbmsCred:
|
||||||
conf.dbmsPass = unicode()
|
conf.dbmsUser, conf.dbmsPass = conf.dbmsCred.split(':')
|
||||||
|
else:
|
||||||
|
conf.dbmsUser = unicode()
|
||||||
|
conf.dbmsPass = unicode()
|
||||||
|
|
||||||
if not conf.dbmsPass:
|
if not conf.dbmsPass:
|
||||||
conf.dbmsPass = None
|
conf.dbmsPass = None
|
||||||
|
|
|
@ -2109,6 +2109,11 @@ def _basicOptionValidation():
|
||||||
errMsg += "(e.g. 1-10) or integer value (e.g. 5)"
|
errMsg += "(e.g. 1-10) or integer value (e.g. 5)"
|
||||||
raise SqlmapSyntaxException(errMsg)
|
raise SqlmapSyntaxException(errMsg)
|
||||||
|
|
||||||
|
if conf.dbmsCred and ':' not in conf.dbmsCred:
|
||||||
|
errMsg = "value for option '--dbms-cred' must be in "
|
||||||
|
errMsg += "format <username>:<password> (e.g. \"root:pass\")"
|
||||||
|
raise SqlmapSyntaxException(errMsg)
|
||||||
|
|
||||||
if conf.charset:
|
if conf.charset:
|
||||||
_ = checkCharEncoding(conf.charset, False)
|
_ = checkCharEncoding(conf.charset, False)
|
||||||
if _ is None:
|
if _ is None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user