Fix bug when threads != cpu_count
When using the --threads flag, the script doesn't end, because it is waiting for cpu_count() threads (which is never satisfied).
This commit is contained in:
parent
5311d5cbb1
commit
bf7a9b83b5
@ -919,7 +919,7 @@ class RuleGen:
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
# Signal workers to stop.
|
# Signal workers to stop.
|
||||||
for i in range(multiprocessing.cpu_count()):
|
for i in range(self.threads):
|
||||||
passwords_queue.put(None)
|
passwords_queue.put(None)
|
||||||
|
|
||||||
# Wait for all of the queued passwords to finish.
|
# Wait for all of the queued passwords to finish.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user