From bf7a9b83b587ed8fd94e2ed7aef13cf568158fce Mon Sep 17 00:00:00 2001 From: Matlink Date: Fri, 17 Mar 2017 13:36:00 +0100 Subject: [PATCH] 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). --- rulegen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rulegen.py b/rulegen.py index 389d578..492f31b 100755 --- a/rulegen.py +++ b/rulegen.py @@ -919,7 +919,7 @@ class RuleGen: else: # Signal workers to stop. - for i in range(multiprocessing.cpu_count()): + for i in range(self.threads): passwords_queue.put(None) # Wait for all of the queued passwords to finish.