I'm working for my bachelor thesis at the end of which I aim to implement a proof-of-concept Javascript-based hash cracker. The idea is to work like this: Users can submit a hash value along with information about the used algorithm. (Other) users can also click on a button on the website in order to participate in the cracking process. The server's task is to accept and split the submitted 'orders' into ranges, depending on the number of available workers. The ranges are then sent to the clients who clicked said button.
I am currently stuck with the big question of how to actually implement this brute force function. So my main problem now is that, frankly, I'm not really that settled in Javascript yet. For starters, I would just use a hardcoded character set: alpha-numeric, lower and upper case, no special characters. Problem is I honestly have absolutely NO clue of how to actually implement the function that would try out al the character combinations, on how to program that. I can imagine using a normal array containing the charset, then two strings. One string would contain the range, the other will contain the tried combinations. So I would somehow have to iterate through the charset array and the strings maybe with cascaded for-loops or something, but I'm really stuck with the question of 'how' exactly :). I don't expect any of you to actually provide me with the full source code for such a function (unless you want to of course), but I'd really appreciate some hints or explanations on how to implement such a brute force function. I'd also not bother about performance or optimized coding at this point, but rather about comprehensive coding, or whatever you might want to call it.