Created
July 23, 2020 15:08
-
-
Save jnovack/fc869d2f5e9e9bab0ad675a9ccacef06 to your computer and use it in GitHub Desktop.
ServiceNow - Decrypt sys_auth_profile_basic Password
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
var sysid = "INSERT_SYS_ID_HERE"; | |
var Encrypter = new GlideEncrypter(); | |
var gr = new GlideRecord('sys_auth_profile_basic'); | |
gr.addQuery("sys_id", sysid); | |
gr.query(); | |
while (gr.next()) { | |
var encrypted = gr.password; | |
var decrypted = Encrypter.decrypt(encrypted); | |
gs.addInfoMessage(decrypted); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment