[Article] Read protected script include

Trung
Kilo Guru

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"));

 

0 REPLIES 0