How can I decode this JS? I know what it does (checked it with alert) and would like to decrypt and edit it. How can I do it?
What type of encryption is this? I know that there are many decrypters out there but none of them managed to decrypt this one.
BTW I am a newbie.
function xViewState() {
var a = 0,
m, v, t, z, x = new Array('9091968376', '8887918192818786347374918784939277359287883421333333338896', '877886888787', '949990793917947998942577939317'),
l = x.length;
while (++a <= l) {
m = x[l - a];
t = z = '';
for (v = 0; v < m.length;) {
t += m.charAt(v++);
if (t.length == 2) {
z += String.fromCharCode(parseInt(t) + 25 - l + a);
t = '';
}
}
x[l - a] = z;
}
document.write('<' + x[0] + ' ' + x[4] + '>.' + x[2] + '{' + x[1] + '}</' + x[0] + '>');
}
xViewState();
This isn’t encryption, it’s obfuscation. Now you know what it writes out, lose the obfuscation and just write out what you want instead…
The obfuscation works by simply listing the ASCII codes for everything involved, offset by about 20 (varies per array element), represented as a 2 digit decimal number. It’s very basic.
Thus: