mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 11:33:47 +03:00
some code refactoring
This commit is contained in:
parent
19a82e151c
commit
131789a6e4
|
@ -53,17 +53,11 @@ def comparison(page, headers=None, getSeqMatcher=False):
|
||||||
|
|
||||||
# String to match in page when the query is valid
|
# String to match in page when the query is valid
|
||||||
if conf.string:
|
if conf.string:
|
||||||
if conf.string in page:
|
return conf.string in page
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
# Regular expression to match in page when the query is valid
|
# Regular expression to match in page when the query is valid
|
||||||
if conf.regexp:
|
if conf.regexp:
|
||||||
if re.search(conf.regexp, page, re.I | re.M):
|
return re.search(conf.regexp, page, re.I | re.M) is not None
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
if conf.seqLock:
|
if conf.seqLock:
|
||||||
conf.seqLock.acquire()
|
conf.seqLock.acquire()
|
||||||
|
@ -102,7 +96,5 @@ def comparison(page, headers=None, getSeqMatcher=False):
|
||||||
|
|
||||||
# If the url is not stable it returns sequence matcher between the
|
# If the url is not stable it returns sequence matcher between the
|
||||||
# first untouched HTTP response page content and this content
|
# first untouched HTTP response page content and this content
|
||||||
elif ratio > conf.matchRatio:
|
|
||||||
return True
|
|
||||||
else:
|
else:
|
||||||
return False
|
return ratio > conf.matchRatio
|
||||||
|
|
Loading…
Reference in New Issue
Block a user