Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] How to decode obfuscated Javscript


  • From: dnunes at gmail.com (diego nunes)
  • Subject: [Javascript] How to decode obfuscated Javscript
  • Date: Fri Sep 22 10:51:21 2006

    That's the code:

function EnCrypt()
{
            var form = document.encrypt;
            var code1 = escape(form.oldcode.value);
            var code2="";
            var thelength = code1.length;
            for (i=0;i<thelength;i++)  {
                code2+=String.fromCharCode(code1.charCodeAt(i)^2);
            }
            var result =
            'var V1AQAPKRV="'+code2+'"; V1Avjgnglevj=""; V1Aqapkrv="";'+
            'var V02amfg3;'+
            'V02amfg3=V1AQAPKRV.length;'+
            'for (i=0;i<V02amfg3;i++)'+
            '{ V1Avjgnglevj+=String.fromCharCode(V1AQAPKRV.charCodeAt(i)^2) }'+
            'V1Aqapkrv=unescape(V1Avjgnglevj);'+
            'document.write(V1Aqapkrv);';
            form.newcode.value=result;
            form.original.value=form.oldcode.value.length;
            form.thenew.value=form.newcode.value.length;
            form.difference.value=form.newcode.value.length-form.oldcode.value.length;
}


    Have fun.

--
diego nunes
dnunes.com