I am trying to generate a list of strings (possible passwords) that I can then hash (SHA-256) to compare to an already existing password hashes that I have.
I know that the password must be a popular boys or girls name, with no specified case, followed by a number ranging from 0 to 9999, e.g BoB167, AliCE1000, conNor99, tHe9329
How can I go about generating the possible password strings that the password can be so that I can then hash them to compare with my hashes
Does anyone know where I can start I was thinking to just create a method that takes in all possible characters add every combination to a string but im unsure as to how to do this
Your question is a little bit too broad, but since you indicated in the comments that your issue is coming up with the lowercase/uppercase combinations of the names, I'll just address that part in my answer.
For a given name with n characters, there are 2n possible combinations of upper and lowercase letters.
E.g. for
bob
there are 23 = 8 possible combinations.Looping from 0 to 2n will yield 2n consecutive integers.
E.g. for
bob
, that would be 0, 1, 2, 3, 4, 5, 6 and 7.E.g. for
bob
, the bit patterns would be 000, 001, 010, 011, and so on.Example code
Output
This yields the following output: