How to obfuscate variable names in JavaScript? -


i'm artist that's written simple game in javascript. yah! go easy on me because bruise peach! i'm looking difficult cheat @ game. code obfuscation make difficult cheat, right? difficult, not impossible. realise that, , accidentally open can of worms here...

essentially, i'm looking online tool renames variables; , don't search , replace in textpad :). example using http://packer.50x.eu/ on 1 line of code

var loopcounter = 0; 

we result:

eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,string)){while(c--){d[c]=k[c]||c}k=[function(e){return d[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}('1 2=0;',3,3,'|var|loopcounter'.split('|'),0,{})) 

the above looks mess, great; it's quite easy pick out english words loopcounter. have expected make variable names obscure (single letter? words without nouns? similar?? or should have been task anyway part of writing code. or waste of time trying make variable names since variable declaration preceded var , therefore there's no point disguise it?

after lot of searching (and links above) i found this allows obfuscated string variables. , after.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -