Skip to content

Instantly share code, notes, and snippets.

@gene1wood
Created October 30, 2014 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gene1wood/973a1c20606cbfc7dea6 to your computer and use it in GitHub Desktop.
Save gene1wood/973a1c20606cbfc7dea6 to your computer and use it in GitHub Desktop.
One line python command to generate MySQL hashed password
echo "mypassword" | python -c "import hashlib; import sys; m = hashlib.sha1(); m.update(sys.stdin.read()); n = hashlib.sha1(); n.update(m.digest()) ; print('*' + n.hexdigest().upper())"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment