Hi Guys, Today I bring you a script that I use to decrypt datasource passwords and also the password of AdminServer, which is very useful on a daily basis. The script uses the encrypted password th…
Hi Guys, Today I bring you a script that I use to decrypt datasource passwords and also the password of AdminServer, which is very useful on a daily basis. The script uses the encrypted password th…
I had an issue with syntax for the python scripts posted in several locations. Here is what finally worked after some formatting:
import os
import weblogic.security.internal.SerializedSystemIni
import weblogic.security.internal.encryption.ClearOrEncryptedService
def decrypt(domainHomeName, encryptedPwd):
domainHomeAbsolutePath = os.path.abspath(domainHomeName)
encryptionService = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domainHomeAbsolutePath)
ces = weblogic.security.internal.encryption.ClearOrEncryptedService(encryptionService)
clear = ces.decrypt(encryptedPwd)
print “RESULT:” + clear
try:
decrypt(sys.argv[1], sys.argv[2])
except:
print “Unexpected error: “, sys.exc_info()[0]
dumpStack()
LikeLike