Jun-08-2017, 07:07 PM
(Jun-08-2017, 04:46 PM)nilamo Wrote:(Jun-08-2017, 01:02 PM)Able98 Wrote: Parallel(n_jobs=-1)(delayed(attempt)(w, pw) for pw in pwds)What isParallel
? What'sdelayed
?
delayed
looks like a decorator, but what does it do?
From that line, my guess is that you're creating a single spare process, which is passed a generator of attempted passwords. Although hopefully that's not the case, sinceattempt
uses global variables and writes to sys.stdout.
As I understand it, the Parallel does parallel processing and is part of the joblib library. I had hoped those here would know more than I.
If I understand you correctly, I will replace sys.stdout stuff with "print" and rename the attempt procedure.
My main suspect is the for loop which I would like to rewrite and have the attempt procedure set a flag for it to stop and exit. I do not see where the "raise PasswordFoundException call is needed at all and as I see it causing the problem. Please suggest a way to rewrite the for loop.