[Article] Read protected script include
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 08:07 PM
Hi everyone,
If the script includes with Protection policy = Protected, we can't read code of this. But with extremely awesome function above, we can do that. (Apply only for Javascript)
var instance=new /**name of script include**/
var list=[];
for(var prop in instance){
var temp=instance[prop] instanceof Function ? instance[prop] :JSON.stringify( instance[prop]);
list.push(prop+": "+temp );
}
gs.print("\n"+list.join("\n"));
- 1,886 Views
0 REPLIES 0