# What is the best way to generate a password/pin like string using brute force method? [closed]

I have a string of 7 characters. I'm supposed to generate all the combinations. But some combinations are more likely than others, I would like the more likely ones to be generated first.

If I iterate from AAAAAAA to ZZZZZZZ, it's very unlikely that AAAAAAA is a valid combination. But BZYEKSO would be more likely being a password (more weight).

What algorithm would allow me to iterate through all combinations and come up with a random key that most likely resembles a valid pin?

If the string was 4 characters, I can pre-generate all the combinations and then scramble it for a better effect. But when the string is 7 characters long (better yet make it include numbers too). There's 36^7 combinations and there would not be enough memory to hold everything.

I'm thinking there's an encryption algorithm that can be used to randomly generate a string that is 7 characters long WITHOUT repeating. ie. I would iterate through the algorithm 36^7 times using 36^7 unique keys and it would give me a 36^7 random numbers that are of length 7 and doesn't repeat.

Is there anything for this that exist?

Thanks!

-

## closed as unclear what you're asking by TildalWave, Xander, Adi, Steve, Scott PackFeb 5 '14 at 1:52

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.