Skip to content

Instantly share code, notes, and snippets.

@netikras
Created November 15, 2021 09:33
Show Gist options
  • Save netikras/a50601905f5910715dd947b51d823c35 to your computer and use it in GitHub Desktop.
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
#!/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 )
@netikras
Copy link
Author

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 “ ”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment