I’ve been working on a brute force program in C++ that for the time being only deals with alpha numeric values (lower case only), and a password of unknown length.
I’m working with a quad core computer so I’ve broken the list of possibilities into four sections and have one thread working on each.
The sections are:
000...0 to 8zz...z
900...0 to hzz...z
i00...0 to qzz...z
r00...0 to zzz...z
Could I make better use of threading to increase the speed? Since only 1 of 4 threads will ever reach the password it feels like 3/4 of the program is a waste of time.
It would seem that if I could have the threads work together somehow it would be more efficient, however I can’t seem to think of a way to do this.
Any advice is much appreciated, I’m quite new to threading.
*EDIT: I should clarify that because it’s a fairly simple program for academic purposes, I am actually only cracking one password, and giving the signal to kill the remaining 3 threads once one finds it. *
Here are some ideas: