Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 219628a

Browse files
committed
quick fixes
1 parent 78547bb commit 219628a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/techniques/blind/inference.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from lib.core.common import dataToSessionFile
3131
from lib.core.common import dataToStdout
3232
from lib.core.common import getCharset
33+
from lib.core.common import getGoodSamaritanCharsets
3334
from lib.core.common import replaceNewlineTabs
3435
from lib.core.common import safeStringFormat
3536
from lib.core.convert import urlencode
@@ -342,10 +343,10 @@ def downloadThread():
342343
charStart = time.time()
343344

344345
if conf.useCommonPrediction:
345-
commonTbl, otherTbl = getCommonPredictionTables(finalValue, asciiTbl)
346-
val = getChar(index, commonTbl) if commonTbl else None
346+
predictedCharset, otherCharset = getGoodSamaritanCharsets(finalValue, asciiTbl)
347+
val = getChar(index, predictedCharset) if predictedCharset else None
347348
if not val:
348-
val = getChar(index, otherTbl)
349+
val = getChar(index, otherCharset)
349350
else:
350351
val = getChar(index, asciiTbl)
351352

0 commit comments

Comments
 (0)