fix for Feature #157

This commit is contained in:
Miroslav Stampar 2010-05-13 11:17:24 +00:00
parent ca3e12ae73
commit d96723a135

View File

@ -161,27 +161,19 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
if not conf.useBetween or kb.dbms == "SQLite":
forgedPayload = safeStringFormat(payload, (expressionUnescaped, idx, posValue))
else:
forgedPayload = safeStringFormat(payload.replace('%3E', 'BETWEEN 0 AND'), (expressionUnescaped, idx, posValue))
forgedPayload = safeStringFormat(payload.replace('%3E', 'NOT BETWEEN 0 AND'), (expressionUnescaped, idx, posValue))
result = Request.queryPage(urlencode(forgedPayload))
if kb.dbms == "SQLite":
posValue = posValueOld
if not conf.useBetween or kb.dbms == "SQLite": #normal
if result:
minValue = posValue
asciiTbl = asciiTbl[position:]
else:
maxValue = posValue
asciiTbl = asciiTbl[:position]
else: #reversed
if result:
maxValue = posValue
asciiTbl = asciiTbl[:position]
else:
minValue = posValue
asciiTbl = asciiTbl[position:]
if result:
minValue = posValue
asciiTbl = asciiTbl[position:]
else:
maxValue = posValue
asciiTbl = asciiTbl[:position]
if len(asciiTbl) == 1:
if maxValue == 1: