linuxrox
asked on
Can someone explain this javascript to me?
Hello, can someone explain how the value 8123 gets produced from this code?
document.write(+q+o+t+y) produces 8123
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}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}('d=7;c=4;b=5;a=2;e=3;f=1;g=9;h=6;i=0;j=8;',20,20,'||||||||||t|p|u|x|y|o|||w|q'.split('|'),0,{}))
document.write(+q+o+t+y) produces 8123
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This seems more like a key to some encryption algorithm. when sorted it became - wotyuphxqg which doesn't make any sense.
ASKER
yea it appears jsbeautifier produced the correct result. i'm trying to figure out how to execute that javascript function either from vb.net or php. basically i'm pulling that function from a remote site and i'd like to execute it from within a program of my own. i don't want to have to use my web browser to execute the function....need to do it from within a program.
I'm not sure about how would you able to do that in vb.net... I think php will be able to execute it within browser.
ASKER
yea i can get php to echo the results out to the browser...just wish there was a way for me to actually get the values without using a browser
I'll take a look for you as it sounds like you just want this converted to a function you can use on php or whatever