Skip to content

Instantly share code, notes, and snippets.

@gleicon
Created April 10, 2010 13:53
Show Gist options
  • Save gleicon/362031 to your computer and use it in GitHub Desktop.
Save gleicon/362031 to your computer and use it in GitHub Desktop.
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
@gleicon
Copy link
Author

gleicon commented Apr 10, 2010

Simple htpasswd util for nginx/lighttpd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment