Steps to create a script and decrypt the password encrypted(AES)
1. Copy the password from the boot.properties file in the path $WLS_MIDDLEWARE_DOMAIN/user_projects/domains/Domain_Name
2. Change the directory in the terminal to the weblogic domain directory/security
"cd $WLS_MIDDLEWARE_DOMAIN/user_projects/domains/Domain_Name
3. Create a python script file using the vi editor command "$vi DecryptScript.py"
Copy and paste the below code
******************************************
from weblogic.security.internal import *
from weblogic.security.internal.encryption import *
encryptionService = SerializedSystemIni.getEncryptionService(".")
clearOrEncryptService = ClearOrEncryptedService(encryptionService)
passwd = raw_input("Enter encrypted password of one which you wanted to decrypt : ")
plainpwd = passwd.replace("\\", "")
print "Plain Text password is: " + clearOrEncryptService.decrypt(plainpwd)
*******************************************
4. Execute the below command and then enter the encrypted password copied from boot.properties file
$java weblogic.WLST DecryptScript.py
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Enter encrypted password of one which you wanted to decrypt : {AES}25YwE3caKyHO23Ym6LNNiLTPxKm7V3YhR4uZdzyjboo=
Output:-
Plain Text password is: XXXXXXXXX
No comments:
Post a Comment