From 9d50c806e1d153e779271b916a6b4df773a6552e Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 5 Jan 2012 10:55:58 +0000 Subject: [PATCH] bug fix --- lib/techniques/blind/inference.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/techniques/blind/inference.py b/lib/techniques/blind/inference.py index da2969e34..cac879bf7 100644 --- a/lib/techniques/blind/inference.py +++ b/lib/techniques/blind/inference.py @@ -169,7 +169,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None return not result - def getChar(idx, charTbl=asciiTbl, continuousOrder=True, expand=charsetType is None): + def getChar(idx, charTbl=asciiTbl, continuousOrder=True, expand=charsetType is None, shiftTable=None): """ continuousOrder means that distance between each two neighbour's numerical values is exactly 1 @@ -182,7 +182,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None originalTbl = list(charTbl) - if continuousOrder: + if continuousOrder and shiftTable is None: # Used for gradual expanding into unicode charspace shiftTable = [5, 4] @@ -273,7 +273,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None dbgMsg = "turning off auto-adjustment mechanism" logger.debug(dbgMsg) kb.adjustTimeDelay = False - return getChar(idx, originalTbl, continuousOrder, expand) + return getChar(idx, originalTbl, continuousOrder, expand, shiftTable) else: errMsg = "unable to properly validate last character value ('%s').." % decodeIntToUnicode(retVal) logger.error(errMsg)