From bf071d33d21cfc59b9de7df56ddb4e491396db5f Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 2 Jun 2010 15:18:33 +0000 Subject: [PATCH] some comments added --- lib/techniques/blind/inference.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/techniques/blind/inference.py b/lib/techniques/blind/inference.py index 83d1f19c6..a760e62e7 100644 --- a/lib/techniques/blind/inference.py +++ b/lib/techniques/blind/inference.py @@ -197,14 +197,16 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None if type(charTbl) != xrange: charTbl = charTbl[:position] - else: # xrange - extended set (e.g. Unicode) + else: charTbl = xrange(charTbl[0], charTbl[position]) if len(charTbl) == 1: if continuousOrder: if maxValue == 1: return None - elif minValue == maxChar: # if we hit the maxChar then extend the working set with xrange (virtual charset used because of memory/space optimization) and continue tests with new set + elif minValue == maxChar: # going beyond the original charset + # if the original charTbl was [0,..,127] new one will be [128,..,128*256-1] or from 128 to 32767 + # and instead of making a HUGE list with all elements we use here xrange, which is a virtual list charTbl = xrange(maxChar + 1, (maxChar + 1) << 8) maxChar = maxValue = charTbl[-1] minChar = minValue = charTbl[0]