minor update

This commit is contained in:
Miroslav Stampar 2011-01-03 09:16:42 +00:00
parent d19a8d53e4
commit 5860b8942f

View File

@ -492,13 +492,23 @@ def simpletonCheckSqlInjection(place, parameter, value):
result = False
randInt = randomInt()
randStr = randomStr()
if value.isdigit():
payload = "%s OR %d>%d" % (value, randInt, randInt+1)
else:
payload = "%s' OR '%s'!='%s" % (value, randStr, randStr)
payload = agent.payload(place, parameter, value, payload)
firstPage, _ = Request.queryPage(payload, place, content=True, raise404=False)
if not (wasLastRequestDBMSError() or wasLastRequestHTTPError()):
if getComparePageRatio(kb.originalPage, firstPage, filtered=True) > CONSTANT_RATIO:
if value.isdigit():
payload = "%s AND %d>%d" % (value, randInt, randInt+1)
else:
payload = "%s' AND '%s'!='%s" % (value, randStr, randStr)
payload = agent.payload(place, parameter, value, payload)
secondPage, _ = Request.queryPage(payload, place, content=True, raise404=False)
result = getComparePageRatio(firstPage, secondPage, filtered=True) <= CONSTANT_RATIO