Skip to content

Instantly share code, notes, and snippets.

@ericcitaire
Last active November 29, 2016 20:04
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 ericcitaire/dd9f6e35f3eb096de1fed3dfe95c2589 to your computer and use it in GitHub Desktop.
Save ericcitaire/dd9f6e35f3eb096de1fed3dfe95c2589 to your computer and use it in GitHub Desktop.
WebLogic hashed passwords
# https://atheek.wordpress.com/2012/05/29/weblogic-sql-authenticator-and-salted-hash-passwords/
from hashlib import sha1
from base64 import b64encode
def hash(password, salt):
sha_hashed = sha1(salt + password)
encoded = b64encode(sha_hashed.digest())
return "{SSHA}" + salt + encoded
print hash("welcome", "T+4M")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment