mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
update
This commit is contained in:
parent
87d8c6719e
commit
738c210075
|
@ -606,20 +606,25 @@ def parseTargetDirect():
|
||||||
details = None
|
details = None
|
||||||
|
|
||||||
for dbms in SUPPORTED_DBMS:
|
for dbms in SUPPORTED_DBMS:
|
||||||
details = re.search("^(?P<dbms>%s)://(?P<optional>(?P<dbmsUser>.+?)\:(?P<dbmsPass>.+?)\@(?P<hostname>.+?)\:(?P<port>[\d]+)\/)?(?P<dbmsDb>.+?)$" % dbms, conf.direct, re.I)
|
details = re.search("^(?P<dbms>%s)://(?P<credentials>(?P<dbmsUser>.+?)\:(?P<dbmsPass>.+?)\@)(?P<remote>(?P<hostname>.+?)\:(?P<port>[\d]+)\/)?(?P<dbmsDb>.+?)$" % dbms, conf.direct, re.I)
|
||||||
|
|
||||||
if details:
|
if details:
|
||||||
conf.dbms = details.group('dbms')
|
conf.dbms = details.group('dbms')
|
||||||
if details.group('optional'):
|
|
||||||
|
if details.group('credentials'):
|
||||||
conf.dbmsUser = details.group('dbmsUser')
|
conf.dbmsUser = details.group('dbmsUser')
|
||||||
conf.dbmsPass = details.group('dbmsPass')
|
conf.dbmsPass = details.group('dbmsPass')
|
||||||
conf.hostname = details.group('hostname')
|
|
||||||
conf.port = int(details.group('port'))
|
|
||||||
else:
|
else:
|
||||||
conf.dbmsUser = str()
|
conf.dbmsUser = str()
|
||||||
conf.dbmsPass = str()
|
conf.dbmsPass = str()
|
||||||
|
|
||||||
|
if details.group('remote'):
|
||||||
|
conf.hostname = details.group('hostname')
|
||||||
|
conf.port = int(details.group('port'))
|
||||||
|
else:
|
||||||
conf.hostname = "localhost"
|
conf.hostname = "localhost"
|
||||||
conf.port = 0
|
conf.port = 0
|
||||||
|
|
||||||
conf.dbmsDb = details.group('dbmsDb')
|
conf.dbmsDb = details.group('dbmsDb')
|
||||||
|
|
||||||
conf.parameters[None] = "direct connection"
|
conf.parameters[None] = "direct connection"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user