mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Minor update
This commit is contained in:
parent
fabbe63f00
commit
7ed05f01b3
|
@ -175,7 +175,7 @@ def checkSqlInjection(place, parameter, value):
|
||||||
|
|
||||||
# Skip tests if title is not included by the given filter
|
# Skip tests if title is not included by the given filter
|
||||||
if conf.testFilter:
|
if conf.testFilter:
|
||||||
if not any(re.search(conf.testFilter, str(item), re.I) for item in (test.title, test.vector, dbms)):
|
if not any(conf.testFilter in str(item) or re.search(conf.testFilter, str(item), re.I) for item in (test.title, test.vector, dbms)):
|
||||||
debugMsg = "skipping test '%s' because " % title
|
debugMsg = "skipping test '%s' because " % title
|
||||||
debugMsg += "its name/vector/dbms is not included by the given filter"
|
debugMsg += "its name/vector/dbms is not included by the given filter"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
|
|
|
@ -1072,11 +1072,11 @@ def parseTargetDirect():
|
||||||
details = re.search("^(?P<dbms>%s)://(?P<credentials>(?P<user>.+?)\:(?P<pass>.*)\@)?(?P<remote>(?P<hostname>.+?)\:(?P<port>[\d]+)\/)?(?P<db>[\w\d\ \:\.\_\-\/\\\\]+?)$" % dbms, conf.direct, re.I)
|
details = re.search("^(?P<dbms>%s)://(?P<credentials>(?P<user>.+?)\:(?P<pass>.*)\@)?(?P<remote>(?P<hostname>.+?)\:(?P<port>[\d]+)\/)?(?P<db>[\w\d\ \:\.\_\-\/\\\\]+?)$" % dbms, conf.direct, re.I)
|
||||||
|
|
||||||
if details:
|
if details:
|
||||||
conf.dbms = details.group('dbms')
|
conf.dbms = details.group("dbms")
|
||||||
|
|
||||||
if details.group('credentials'):
|
if details.group('credentials'):
|
||||||
conf.dbmsUser = details.group('user')
|
conf.dbmsUser = details.group("user")
|
||||||
conf.dbmsPass = details.group('pass')
|
conf.dbmsPass = details.group("pass")
|
||||||
else:
|
else:
|
||||||
if conf.dbmsCred:
|
if conf.dbmsCred:
|
||||||
conf.dbmsUser, conf.dbmsPass = conf.dbmsCred.split(':')
|
conf.dbmsUser, conf.dbmsPass = conf.dbmsCred.split(':')
|
||||||
|
@ -1087,16 +1087,15 @@ def parseTargetDirect():
|
||||||
if not conf.dbmsPass:
|
if not conf.dbmsPass:
|
||||||
conf.dbmsPass = None
|
conf.dbmsPass = None
|
||||||
|
|
||||||
if details.group('remote'):
|
if details.group("remote"):
|
||||||
remote = True
|
remote = True
|
||||||
conf.hostname = details.group('hostname').strip()
|
conf.hostname = details.group("hostname").strip()
|
||||||
conf.port = int(details.group('port'))
|
conf.port = int(details.group("port"))
|
||||||
else:
|
else:
|
||||||
conf.hostname = "localhost"
|
conf.hostname = "localhost"
|
||||||
conf.port = 0
|
conf.port = 0
|
||||||
|
|
||||||
conf.dbmsDb = details.group('db')
|
conf.dbmsDb = details.group("db")
|
||||||
|
|
||||||
conf.parameters[None] = "direct connection"
|
conf.parameters[None] = "direct connection"
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue
Block a user