possible fix for a multi-processing "problem" reported by christopher.oakley@gmail.com

This commit is contained in:
Miroslav Stampar 2011-07-11 11:40:27 +00:00
parent 4ae71fd5f4
commit 7bc6280d53

View File

@ -504,9 +504,11 @@ def dictionaryAttack(attack_dict):
retVal = multiprocessing.Queue()
for i in xrange(multiprocessing.cpu_count()):
p = multiprocessing.Process(target=bruteProcess, args=(attack_info, hash_regex, kb.wordlist, suffix, retVal, i, multiprocessing.cpu_count()))
p.start()
processes.append(p)
for p in processes:
p.start()
for p in processes:
p.join()
@ -610,9 +612,11 @@ def dictionaryAttack(attack_dict):
for i in xrange(multiprocessing.cpu_count()):
p = multiprocessing.Process(target=bruteProcess, args=(user, hash_, kwargs, hash_regex, kb.wordlist, suffix, retVal, found_, i, multiprocessing.cpu_count()))
p.start()
processes.append(p)
for p in processes:
p.start()
for p in processes:
p.join()