For example this is example original javascript:
function test(){
var a = 34;
alert("test");
document.write(a);
}
Packed script will become like this:
eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2 0(){3 1=4;5("0");6.7(1)}',8,8,'test|a|function|var|34|alert|document|write'.split('|'),0,{}))
Nothing different in script execution, just become hard to read... :D
Just for suggestion, don't pack a large script because the script size will become larger. Just pack important small script.. :D
Then, how do I decode it if I found similar script? Ok, wait for the next post.. :D
Hope this useful
Post a Comment