Last active
November 29, 2016 20:04
-
-
Save ericcitaire/dd9f6e35f3eb096de1fed3dfe95c2589 to your computer and use it in GitHub Desktop.
WebLogic hashed passwords
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
# 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