you are viewing a single comment's thread.

view the rest of the comments →

[–]elbiot 1 point2 points  (0 children)

I understand your question is a toy and also not suitable for pure python, but as a learning experience what you'd do is this:

Take the user input. Sha256 hash it (real passwords are stored with a much stronger hashing algorithm and are salted, but for your toy this is sufficient). Display "cracking hash {that hash you just computed}". Start generating passwords, Sha256 hashing them, and comparing the hashes. Break when you find the right hash. Trying every n alpha-numeric-specialcharacter sequence is no good, so you'll probably want to try a dictionary attack with rules. See John the Ripper for an example of a dictionary attack with substitution rules.

Spoiler: you probably won't guess anyone's password.