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

Skip to content

Commit 7ed05f0

Browse files
committed
Minor update
1 parent fabbe63 commit 7ed05f0

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

lib/controller/checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def checkSqlInjection(place, parameter, value):
175175

176176
# Skip tests if title is not included by the given filter
177177
if conf.testFilter:
178-
if not any(re.search(conf.testFilter, str(item), re.I) for item in (test.title, test.vector, dbms)):
178+
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)):
179179
debugMsg = "skipping test '%s' because " % title
180180
debugMsg += "its name/vector/dbms is not included by the given filter"
181181
logger.debug(debugMsg)

lib/core/common.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,11 +1072,11 @@ def parseTargetDirect():
10721072
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)
10731073

10741074
if details:
1075-
conf.dbms = details.group('dbms')
1075+
conf.dbms = details.group("dbms")
10761076

10771077
if details.group('credentials'):
1078-
conf.dbmsUser = details.group('user')
1079-
conf.dbmsPass = details.group('pass')
1078+
conf.dbmsUser = details.group("user")
1079+
conf.dbmsPass = details.group("pass")
10801080
else:
10811081
if conf.dbmsCred:
10821082
conf.dbmsUser, conf.dbmsPass = conf.dbmsCred.split(':')
@@ -1087,16 +1087,15 @@ def parseTargetDirect():
10871087
if not conf.dbmsPass:
10881088
conf.dbmsPass = None
10891089

1090-
if details.group('remote'):
1090+
if details.group("remote"):
10911091
remote = True
1092-
conf.hostname = details.group('hostname').strip()
1093-
conf.port = int(details.group('port'))
1092+
conf.hostname = details.group("hostname").strip()
1093+
conf.port = int(details.group("port"))
10941094
else:
10951095
conf.hostname = "localhost"
10961096
conf.port = 0
10971097

1098-
conf.dbmsDb = details.group('db')
1099-
1098+
conf.dbmsDb = details.group("db")
11001099
conf.parameters[None] = "direct connection"
11011100

11021101
break

0 commit comments

Comments
 (0)