如何解密此JS

How can I decrypt this JS?

本文关键字:JS 解密 何解密      更新时间:2023-09-26

如何解码此JS?我知道它的作用(用警报检查了它),想解密和编辑它。我该怎么做?

这是什么类型的加密?我知道有很多解密器,但没有一个能解密这个。

顺便说一句,我是个新手。

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();

这不是加密,而是混淆。现在你知道它写的是什么,不要混淆,只写你想要的。。。

document.write('<style undefined>.yourstylename{position:absolute;top:-9999px}</style>');

模糊处理的工作原理是简单地列出所有涉及的ASCII代码,偏移约20(每个数组元素不同),表示为2位十进制数字。这是非常基本的。

因此:

"style"
-> 115, 116, 121, 108, 101 (ASCII codes)
-> 90, 91, 96, 83, 76 (offset of 25 in this case)