mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Revert of previous commit (more care has to be done regarding headers dynamicity)
This commit is contained in:
parent
33094a118c
commit
8141d17985
3 changed files with 20 additions and 17 deletions
|
|
@ -360,11 +360,11 @@ def checkSqlInjection(place, parameter, value):
|
|||
kb.matchRatio = None
|
||||
kb.negativeLogic = (where == PAYLOAD.WHERE.NEGATIVE)
|
||||
Request.queryPage(genCmpPayload(), place, raise404=False)
|
||||
falseContent = threadData.lastComparisonContent
|
||||
falsePage = threadData.lastComparisonPage or ""
|
||||
|
||||
# Perform the test's True request
|
||||
trueResult = Request.queryPage(reqPayload, place, raise404=False)
|
||||
trueContent = threadData.lastComparisonContent
|
||||
truePage = threadData.lastComparisonPage or ""
|
||||
|
||||
if trueResult:
|
||||
falseResult = Request.queryPage(genCmpPayload(), place, raise404=False)
|
||||
|
|
@ -377,9 +377,9 @@ def checkSqlInjection(place, parameter, value):
|
|||
injectable = True
|
||||
|
||||
if not injectable and not any((conf.string, conf.notString, conf.regexp)) and kb.pageStable:
|
||||
trueSet = set(extractTextTagContent(trueContent))
|
||||
falseSet = set(extractTextTagContent(falseContent))
|
||||
candidates = filter(None, (_.strip() if _.strip() in (kb.pageTemplate or "") and _.strip() not in falseContent else None for _ in (trueSet - falseSet)))
|
||||
trueSet = set(extractTextTagContent(truePage))
|
||||
falseSet = set(extractTextTagContent(falsePage))
|
||||
candidates = filter(None, (_.strip() if _.strip() in (kb.pageTemplate or "") and _.strip() not in falsePage else None for _ in (trueSet - falseSet)))
|
||||
if candidates:
|
||||
conf.string = candidates[0]
|
||||
infoMsg = "%s parameter '%s' seems to be '%s' injectable (with --string=\"%s\")" % (place, parameter, title, repr(conf.string).lstrip('u').strip("'"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue