Skip to content

Instantly share code, notes, and snippets.

@mrtc0
Last active November 2, 2019 08:24
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrtc0/1161ff1edd71c51bb45e to your computer and use it in GitHub Desktop.
Save mrtc0/1161ff1edd71c51bb45e to your computer and use it in GitHub Desktop.
Password Generator for Python3
#!/usr/bin/python3
import random
chars = "abcdefghijklmnopqrstuvwxyziABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890^?!?$%&/()=?`'+#*'~';:_,.-<>|"
password = ""
print("Use Char list = %s \n" % chars)
length = int(input("[*] Input Password Length: "))
while len(password) != length:
password = password + random.choice(chars)
if len(password) == length:
print("Password: %s" % password)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment