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

Skip to content

Commit 4fc462c

Browse files
committed
Minor update for an Issue #105
1 parent 2656b8f commit 4fc462c

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

lib/core/wordlist.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ def adjust(self):
2929
if self.index > len(self.filenames):
3030
raise StopIteration
3131
elif self.index == len(self.filenames):
32-
if not self.proc_id:
33-
self.iter = iter(self.custom)
34-
else:
35-
raise StopIteration
32+
self.iter = iter(self.custom)
3633
else:
3734
current = self.filenames[self.index]
3835
self.fp = open(current, "r")
@@ -48,15 +45,13 @@ def closeFP(self):
4845
def next(self):
4946
retVal = None
5047
while True:
48+
self.counter += 1
5149
try:
5250
retVal = self.iter.next().rstrip()
5351
except StopIteration:
5452
self.adjust()
5553
retVal = self.iter.next().rstrip()
56-
if not self.proc_count:
57-
break
58-
self.counter += 1
59-
if self.counter % self.proc_count == self.proc_id:
54+
if not self.proc_count or self.counter % self.proc_count == self.proc_id:
6055
break
6156
return retVal
6257

0 commit comments

Comments
 (0)