Skip to content

Instantly share code, notes, and snippets.

@jnovack
Created July 23, 2020 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnovack/fc869d2f5e9e9bab0ad675a9ccacef06 to your computer and use it in GitHub Desktop.
Save jnovack/fc869d2f5e9e9bab0ad675a9ccacef06 to your computer and use it in GitHub Desktop.
ServiceNow - Decrypt sys_auth_profile_basic Password
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