Created
February 6, 2014 02:09
-
-
Save kcollasarundell/8837214 to your computer and use it in GitHub Desktop.
Password hashing tool for those of us suffering redhat systems
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 | |
import crypt | |
import sys | |
ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
rounds = 25412 | |
password = str(sys.argv[1]) | |
salt = ''.join(random.choice(ALPHABET) for i in range(16)) | |
salt = '$6$rounds='+ str(rounds) + '$' + salt | |
print crypt.crypt(password, salt) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment