mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
fix for Feature #187 (Skip duplicates parameters in -g)
This commit is contained in:
parent
6a6ff09c9a
commit
28d9115373
|
@ -199,21 +199,26 @@ def start():
|
||||||
|
|
||||||
for parameter, value in paramDict.items():
|
for parameter, value in paramDict.items():
|
||||||
testSqlInj = True
|
testSqlInj = True
|
||||||
|
paramKey = (conf.hostname, place, parameter)
|
||||||
|
|
||||||
|
if paramKey in kb.testedParams:
|
||||||
|
warnMsg = "skipping previously processed %s parameter '%s'" % (place, parameter)
|
||||||
|
logger.warn(warnMsg)
|
||||||
|
testSqlInj = False
|
||||||
# Avoid dinamicity test if the user provided the
|
# Avoid dinamicity test if the user provided the
|
||||||
# parameter manually
|
# parameter manually
|
||||||
if parameter in conf.testParameter:
|
elif parameter in conf.testParameter:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
elif not checkDynParam(place, parameter, value):
|
elif not checkDynParam(place, parameter, value):
|
||||||
warnMsg = "%s parameter '%s' is not dynamic" % (place, parameter)
|
warnMsg = "%s parameter '%s' is not dynamic" % (place, parameter)
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
testSqlInj = False
|
testSqlInj = False
|
||||||
|
|
||||||
else:
|
else:
|
||||||
logMsg = "%s parameter '%s' is dynamic" % (place, parameter)
|
logMsg = "%s parameter '%s' is dynamic" % (place, parameter)
|
||||||
logger.info(logMsg)
|
logger.info(logMsg)
|
||||||
|
|
||||||
|
kb.testedParams.add(paramKey)
|
||||||
|
|
||||||
if testSqlInj:
|
if testSqlInj:
|
||||||
for parenthesis in range(0, 4):
|
for parenthesis in range(0, 4):
|
||||||
logMsg = "testing sql injection on %s " % place
|
logMsg = "testing sql injection on %s " % place
|
||||||
|
|
|
@ -1011,6 +1011,7 @@ def __setKnowledgeBaseAttributes():
|
||||||
kb.resumedQueries = {}
|
kb.resumedQueries = {}
|
||||||
kb.stackedTest = None
|
kb.stackedTest = None
|
||||||
kb.targetUrls = set()
|
kb.targetUrls = set()
|
||||||
|
kb.testedParams = set()
|
||||||
kb.timeTest = None
|
kb.timeTest = None
|
||||||
kb.unionComment = ""
|
kb.unionComment = ""
|
||||||
kb.unionCount = None
|
kb.unionCount = None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user