I thought those algorithms were almost spot on for what you're trying to do (brute force approach).

If you look at a definition of what a permutation is (it's been 10 or so years so I did Mathematics so I had to look it up):

http://mathforum.org/dr.math/faq/faq.comb.perm.html Those algorithm's will return you the possible values in a permutation (given the right input).

Ok, as I said my math is a little out but Ill give it a shot anyway.

Lets say you have a "password" of length 5, that can be any combination of "lowercase letters" and numbers (ie. a..z 0..9)

So the number of possible permutations of that password is:

36_P_5 = 36! / (36 - 5)! = 45,239,040

My understanding that those algorithms posted would actually return in each iteration a particular set of values.

In the above case there would be ~45 Million iterations.

Please feel free to flame if my Math is incorrect.