Created
April 10, 2010 13:53
-
-
Save gleicon/362031 to your computer and use it in GitHub Desktop.
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
import crypt | |
import sys | |
if len(sys.argv) == 3: | |
print("%s:%s" % (sys.argv[1], crypt.crypt(sys.argv[2], sys.argv[2]))) | |
else: | |
print 'python htpasswd.py <user> <pass> >> /path/to/your/htpass_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple htpasswd util for nginx/lighttpd