Last active
June 29, 2023 17:02
-
-
Save rohityadavcloud/d9bf977ad30bda1de0ea to your computer and use it in GitHub Desktop.
vnc-decrypt: CloudStack VNC Password decryption tool
This file contains hidden or 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
#!/bin/bash | |
# Usage comment out code that you don't need per your CloudStack version | |
input=$(mysql -u root -proot -e "select vnc_password from cloud.vm_instance where name='$1'\G;" | grep vnc_password | sed 's/.*vnc_password: //') | |
# For older ACS versions: | |
java -classpath /usr/share/cloudstack-common/lib/jasypt-1.9.0.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI decrypt.sh input=$input password=password verbose=true | |
# For ACS 4.15-17: | |
java -classpath /usr/share/cloudstack-common/lib/jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI decrypt.sh input=$input password=password verbose=true | |
# For ACS 4.18+: | |
java -classpath /usr/share/cloudstack-common/lib/cloudstack-utils.jar com.cloud.utils.crypt.EncryptionCLI -d -e V2 -p password -i $input -v |
well, v1.9.3 is the latest we'll move in 4.14/master. But this shall also work @andrijapanicsb
We would need update for the 4.18+, due to the new encryption scheme
java -classpath /usr/share/cloudstack-common/lib/cloudstack-utils.jar com.cloud.utils.crypt.EncryptionCLI -d -e V2 -p password -i $input -v
This was ages ago I didn't know anybody was using this @andrijapanicsb :) I'll fix this, perhaps @ustcweizhou can review
looks good !
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
version atm 1.9.2 :)