title: Checking every "word" from aaa..a to zzz..z
body: <p>My program is supposed to be a brute force password cracker (school assignment).
  The input arguments are as follows..</p>
  
  <pre><code>./crack threads keysize target
  </code></pre>
  
  <p>The program needs to check passwords of length keysize, but also need to check shorter ones. 
  I am unsure of how to go about writing something that will just change one letter at a time, and then continue doing this..
  (keysize max is going to 8)</p>
  
  <p>Example..</p>
  
  <p>keysize = 5, so a loop (I think) would need to modify something that is equal to "aaaaa" to "aaaab" to "aaaac", putting each result into crypt_r(), along with the salt (first two characters of <em>target</em>) until a match is found.</p>
  
  <p>I'm using crypt_r because the next step is to add multi-threading.</p>
  
  <p>Unsure if anything else is really needed to explain this question. Would be glad to clarify.</p>