@@ -512,6 +512,8 @@ def getChar(idx, charTbl=None, continuousOrder=True, expand=charsetType is None,
512512 threadData .shared .value = [None ] * length
513513 threadData .shared .index = [firstChar ] # As list for python nested function scoping
514514 threadData .shared .start = firstChar
515+ threadData .shared .retrieved = 0
516+ threadData .shared .endIndex = 0
515517
516518 try :
517519 def blindThread ():
@@ -537,33 +539,30 @@ def blindThread():
537539 break
538540
539541 with kb .locks .value :
540- threadData .shared .value [currentCharIndex - 1 - firstChar ] = val
542+ idx = currentCharIndex - 1 - firstChar
543+ threadData .shared .value [idx ] = val
544+ threadData .shared .retrieved += 1
545+ if idx > threadData .shared .endIndex :
546+ threadData .shared .endIndex = idx
541547 currentValue = list (threadData .shared .value )
542548
543549 if kb .threadContinue :
544550 if showEta :
545551 progress .progress (threadData .shared .index [0 ])
546552 elif conf .verbose >= 1 :
547553 startCharIndex = 0
548- endCharIndex = 0
549-
550- for i in xrange (length ):
551- if currentValue [i ] is not None :
552- endCharIndex = max (endCharIndex , i )
554+ endCharIndex = threadData .shared .endIndex
553555
554556 output = ''
555557
556558 if endCharIndex > conf .progressWidth :
557559 startCharIndex = endCharIndex - conf .progressWidth
558560
559- count = threadData .shared .start
561+ count = threadData .shared .start + threadData . shared . retrieved
560562
561563 for i in xrange (startCharIndex , endCharIndex + 1 ):
562564 output += '_' if currentValue [i ] is None else filterControlChars (currentValue [i ] if len (currentValue [i ]) == 1 else ' ' , replacement = ' ' )
563565
564- for i in xrange (length ):
565- count += 1 if currentValue [i ] is not None else 0
566-
567566 if startCharIndex > 0 :
568567 output = ".." + output [2 :]
569568
0 commit comments