mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-02 20:54:13 +03:00
Minor update
This commit is contained in:
parent
484fa61afc
commit
d3551631c4
|
@ -3479,6 +3479,15 @@ def findPageForms(content, url, raise_=False, addToTargets=False):
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# flag to know if we are dealing with the same target host
|
||||||
|
_ = reduce(lambda x, y: x == y, map(lambda x: urlparse.urlparse(x).netloc.split(':')[0], (response.geturl(), url)))
|
||||||
|
|
||||||
|
if conf.scope:
|
||||||
|
if not re.search(conf.scope, url, re.I):
|
||||||
|
continue
|
||||||
|
elif not _:
|
||||||
|
continue
|
||||||
|
else:
|
||||||
target = (url, method, data, conf.cookie, None)
|
target = (url, method, data, conf.cookie, None)
|
||||||
retVal.add(target)
|
retVal.add(target)
|
||||||
else:
|
else:
|
||||||
|
@ -3490,17 +3499,6 @@ def findPageForms(content, url, raise_=False, addToTargets=False):
|
||||||
|
|
||||||
if addToTargets and retVal:
|
if addToTargets and retVal:
|
||||||
for target in retVal:
|
for target in retVal:
|
||||||
url = target[0]
|
|
||||||
|
|
||||||
# flag to know if we are dealing with the same target host
|
|
||||||
_ = reduce(lambda x, y: x == y, map(lambda x: urlparse.urlparse(x).netloc.split(':')[0], (response.geturl(), url)))
|
|
||||||
|
|
||||||
if conf.scope:
|
|
||||||
if not re.search(conf.scope, url, re.I):
|
|
||||||
continue
|
|
||||||
elif not _:
|
|
||||||
continue
|
|
||||||
|
|
||||||
kb.targets.add(target)
|
kb.targets.add(target)
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
Loading…
Reference in New Issue
Block a user