mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Patch for an Issue #584
This commit is contained in:
parent
5b2ded0b18
commit
4819e19200
|
@ -20,7 +20,7 @@ class ProgressBar(object):
|
|||
self._oldProgBar = ""
|
||||
self._min = int(minValue)
|
||||
self._max = int(maxValue)
|
||||
self._span = self._max - self._min
|
||||
self._span = max(self._max - self._min, 0.001)
|
||||
self._width = totalWidth if totalWidth else conf.progressWidth
|
||||
self._amount = 0
|
||||
self._times = []
|
||||
|
@ -49,7 +49,7 @@ class ProgressBar(object):
|
|||
diffFromMin = float(self._amount - self._min)
|
||||
percentDone = (diffFromMin / float(self._span)) * 100.0
|
||||
percentDone = round(percentDone)
|
||||
percentDone = int(percentDone)
|
||||
percentDone = min(100, int(percentDone))
|
||||
|
||||
# Figure out how many hash bars the percentage should be
|
||||
allFull = self._width - len("100%% [] %s/%s ETA 00:00" % (self._max, self._max))
|
||||
|
|
Loading…
Reference in New Issue
Block a user