Skip to content

Instantly share code, notes, and snippets.

@orita
Created November 24, 2014 15:38
Show Gist options
  • Save orita/91e7b5927c014a2a7771 to your computer and use it in GitHub Desktop.
Save orita/91e7b5927c014a2a7771 to your computer and use it in GitHub Desktop.
mkpasswd512_test.py
import sys, string, crypt
from random import *
argvs = sys.argv
chars = string.ascii_letters + string.digits
salt = "$6$" + "".join(choice(chars) for i in range(16))
print crypt.crypt(argvs[0], salt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment