Created
February 7, 2014 07:22
-
-
Save n0ts/8858542 to your computer and use it in GitHub Desktop.
Generate password
This file contains 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
from crypt import crypt | |
from random import choice | |
import string | |
import sys | |
salt_pop = string.letters + string.digits + '.' + '/' | |
salt = '' | |
for i in range(8): | |
salt = salt + choice(salt_pop) | |
salt = '$1$' + salt | |
encpass = crypt(sys.argv[1], salt) | |
print encpass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment