Created
November 15, 2021 09:33
-
-
Save netikras/a50601905f5910715dd947b51d823c35 to your computer and use it in GitHub Desktop.
a digital version of https://twitter.com/nixcraft/status/1441029704463503368 python pw generator
This file contains hidden or 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
#!/usr/bin/python | |
import random | |
lower ="absdefghijklmnopqrstuvwxyz" | |
upper ="ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
numbers="0123456789" | |
symbols= "[]{}()*;/,_-" | |
all = lower + upper + numbers+ symbols | |
length = 16 | |
password= "".join(random.sample(all, length)) | |
print( password ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rewrote the code as-is, trying my best to preserve all original spacings.
One thing I didn't preserve is quotation marks - I used
"
instead of“ ”