Is Crunch multi-threaded?
I have a question about the Crunch wordlist... version 3.2, if it matters which version.
The question is... does it use multiple threads? So, if I have 4 threads on my CPU, will it use them all?
This is important, because it would significantly speed up wordlist generation.
Re: Is Crunch multi-threaded?
Yes, crunch is multi-threaded application.
If you want to know more about crunch, there is a source code inside a package, open it and see how many threads crunch creates.
However if your processor has 4 cores, that does not mean that all 4 cores will be used by the application at the same time (even if application created 4 threads).
Also note that an multi-threaded application is not the only one that lunches threads, there are usually hundredths of threads (of various applications) managed by the OS.
How many cores will be used by an multi-threaded application depends on 2 things:
1. How many threads does application creates.
2. How does system manage threads in a given time
I asked a simple question once on stackoverflow Have a look
Hope this answers your question :)
Re: Is Crunch multi-threaded?
If you look at the source you see it using fork() and pthead() functions. I didn't try to see what it does with those functions, I just grep'ed them.
But I didn't found any muxes or semaphores. Maybe it uses another synchronization technique, but at least I think it's not using threads and processes when it's writing the data on the disk.
you could check with these commands to see if it uses multiple processes and threads:
ps -ejH - shows the process tree
ps -eLf - shows info about threads
Re: Is Crunch multi-threaded?
No crunch is not multi-threaded. Crunch's output should be piped into another application for best results. The receiving application should be multi-threaded. For example if your receiving application is air-crack-ng, air-crack-ng becomes your bottleneck. Calculating the hash of a WPA2 password uses a lot more resources than generating the word for the hashing algorithm. In short, crunch almost always generates words faster than the receiving application can handle them.