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

Skip to content

Commit bf071d3

Browse files
committed
some comments added
1 parent c470255 commit bf071d3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/techniques/blind/inference.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,16 @@ def getChar(idx, charTbl=asciiTbl, continuousOrder=True): # continuousOrder mean
197197

198198
if type(charTbl) != xrange:
199199
charTbl = charTbl[:position]
200-
else: # xrange - extended set (e.g. Unicode)
200+
else:
201201
charTbl = xrange(charTbl[0], charTbl[position])
202202

203203
if len(charTbl) == 1:
204204
if continuousOrder:
205205
if maxValue == 1:
206206
return None
207-
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
207+
elif minValue == maxChar: # going beyond the original charset
208+
# if the original charTbl was [0,..,127] new one will be [128,..,128*256-1] or from 128 to 32767
209+
# and instead of making a HUGE list with all elements we use here xrange, which is a virtual list
208210
charTbl = xrange(maxChar + 1, (maxChar + 1) << 8)
209211
maxChar = maxValue = charTbl[-1]
210212
minChar = minValue = charTbl[0]

0 commit comments

Comments
 (0)