mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Prevent double tests (e.g. in same final tests where suffix is cut by the comment)
This commit is contained in:
parent
ca2f63c672
commit
48b627f3ff
|
@ -90,6 +90,7 @@ def checkSqlInjection(place, parameter, value):
|
||||||
|
|
||||||
paramType = conf.method if conf.method not in (None, HTTPMETHOD.GET, HTTPMETHOD.POST) else place
|
paramType = conf.method if conf.method not in (None, HTTPMETHOD.GET, HTTPMETHOD.POST) else place
|
||||||
tests = getSortedInjectionTests()
|
tests = getSortedInjectionTests()
|
||||||
|
seenPayload = set()
|
||||||
|
|
||||||
while tests:
|
while tests:
|
||||||
test = tests.pop(0)
|
test = tests.pop(0)
|
||||||
|
@ -390,6 +391,11 @@ def checkSqlInjection(place, parameter, value):
|
||||||
boundPayload = agent.prefixQuery(fstPayload, prefix, where, clause)
|
boundPayload = agent.prefixQuery(fstPayload, prefix, where, clause)
|
||||||
boundPayload = agent.suffixQuery(boundPayload, comment, suffix, where)
|
boundPayload = agent.suffixQuery(boundPayload, comment, suffix, where)
|
||||||
reqPayload = agent.payload(place, parameter, newValue=boundPayload, where=where)
|
reqPayload = agent.payload(place, parameter, newValue=boundPayload, where=where)
|
||||||
|
if reqPayload:
|
||||||
|
if reqPayload in seenPayload:
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
seenPayload.add(reqPayload)
|
||||||
else:
|
else:
|
||||||
reqPayload = None
|
reqPayload = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user