Created
June 2, 2020 01:27
-
-
Save richardbwest/006dc89920e69b4a5e9dcf211d70e4c1 to your computer and use it in GitHub Desktop.
Brute Force Recursive Demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chars = "abcABC123£$%" #Add as many chars as you like to the test (or generate using and ord to chr range) | |
maxlen = 4 #Maximum password length to generate. | |
def brute(current): | |
print(current) | |
if len(current) == maxlen: | |
return | |
for letter in chars: | |
brute(current + letter) | |
brute("") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment