From 219628aa01c19278ed1181874dcc54ee4e8ed567 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 21 May 2010 12:25:49 +0000 Subject: [PATCH] quick fixes --- lib/techniques/blind/inference.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/techniques/blind/inference.py b/lib/techniques/blind/inference.py index 9ec1c49c2..fd850ef94 100644 --- a/lib/techniques/blind/inference.py +++ b/lib/techniques/blind/inference.py @@ -30,6 +30,7 @@ from lib.core.agent import agent from lib.core.common import dataToSessionFile from lib.core.common import dataToStdout from lib.core.common import getCharset +from lib.core.common import getGoodSamaritanCharsets from lib.core.common import replaceNewlineTabs from lib.core.common import safeStringFormat from lib.core.convert import urlencode @@ -342,10 +343,10 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None charStart = time.time() if conf.useCommonPrediction: - commonTbl, otherTbl = getCommonPredictionTables(finalValue, asciiTbl) - val = getChar(index, commonTbl) if commonTbl else None + predictedCharset, otherCharset = getGoodSamaritanCharsets(finalValue, asciiTbl) + val = getChar(index, predictedCharset) if predictedCharset else None if not val: - val = getChar(index, otherTbl) + val = getChar(index, otherCharset) else: val = getChar(index, asciiTbl)