Skip to content

Instantly share code, notes, and snippets.

@rsp9u
Created June 12, 2019 05:42
Show Gist options
  • Select an option

  • Save rsp9u/9ad5ac33d9b1f5ada02306003a1f2f34 to your computer and use it in GitHub Desktop.

Select an option

Save rsp9u/9ad5ac33d9b1f5ada02306003a1f2f34 to your computer and use it in GitHub Desktop.
A password generator (no rules)
import sys
import string
import random
if len(sys.argv) >= 2:
pwlen = int(sys.argv[1])
else:
pwlen = 16
print("".join(random.choices(string.ascii_letters + string.digits + string.punctuation, k=pwlen)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment