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

Skip to content

Commit 35642a0

Browse files
committed
some more adjustments
1 parent 1b30c46 commit 35642a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/techniques/blind/inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def tryHint(idx):
144144

145145
return None
146146

147-
def getChar(idx, charTbl=asciiTbl, continuousOrder=True): # continuousOrder means that distance between each two neighbour's numerical values is exactly 1
147+
def getChar(idx, charTbl=asciiTbl, continuousOrder=True, expand=charsetType is None): # continuousOrder means that distance between each two neighbour's numerical values is exactly 1
148148
result = tryHint(idx)
149149

150150
if result:
@@ -209,7 +209,7 @@ def getChar(idx, charTbl=asciiTbl, continuousOrder=True): # continuousOrder mean
209209
elif minValue == maxChar: # going beyond the original charset
210210
# if the original charTbl was [0,..,127] new one will be [128,..,128*16-1] or from 128 to 2047
211211
# and instead of making a HUGE list with all elements we use here xrange, which is a virtual list
212-
if shiftTable:
212+
if expand and shiftTable:
213213
charTbl = xrange(maxChar + 1, (maxChar + 1) << shiftTable.pop())
214214
maxChar = maxValue = charTbl[-1]
215215
minChar = minValue = charTbl[0]

0 commit comments

Comments
 (0)