Skip to content

Instantly share code, notes, and snippets.

@richardbwest
Created June 2, 2020 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardbwest/006dc89920e69b4a5e9dcf211d70e4c1 to your computer and use it in GitHub Desktop.
Save richardbwest/006dc89920e69b4a5e9dcf211d70e4c1 to your computer and use it in GitHub Desktop.
Brute Force Recursive Demo
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