Skip to content

Instantly share code, notes, and snippets.

@jbweber
Created October 3, 2017 03:25
Show Gist options
  • Save jbweber/3662b266fe9c6c9ea06d75e52ac97b6a to your computer and use it in GitHub Desktop.
Save jbweber/3662b266fe9c6c9ea06d75e52ac97b6a to your computer and use it in GitHub Desktop.
password generation
#!/usr/bin/python
import random
import string
options = string.ascii_letters
options += string.hexdigits
options += '_-@#$^'
size = random.randint(16, 32)
password = ''.join(random.choice(options) for i in range(size))
print password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment