如何从网站解密这个JavaScript

时间:2014-09-19 19:32:40

标签: javascript

var _0x2741 = [“\ x69 \ x64”,“\ x63 \ x65 \ x69 \ x6C”,“\ x6C \ x65 \ x76 \ x65 \ x6C”]; var LoyaltyCoefficient = [0,1,4,12 ,24,0]; var LoyaltyCoefficient1 = [0,1,3,6,12,0]; var LoyaltyCoefficient2 = [0,1,4,12,24,0]; var LoyaltyCoefficient3 = [0,1,4, 12,24,0]; var a; var b; var c; var d; function get_loyality_max(_0xd321xa){a =(20 + Math_0x2741 [1] * 10)* LoyaltyCoefficient [_0xd321xa [_0x2741 [2]]]; b =(220 + Math_0x2741 [1] * 10)* LoyaltyCoefficient1 [_0xd321xa [_0x2741 [2]]]; C =(15 + Math_0x2741 [1] * 5)* LoyaltyCoefficient2 [_0xd321xa [_0x2741 [2]]]; d =( 20 + Math_0x2741 [1] * 5)* LoyaltyCoefficient3 [_0xd321xa [_0x2741 [2]]];如果(_0xd321xa [_0x2741 [0]] == 16 || _0xd321xa [_0x2741 [0]] == 17 || _0xd321xa [_0x2741 [0]] == 18){return b;}; if(_0xd321xa [_0x2741 [0]] == 19 || _0xd321xa [_0x2741 [0]] == 20 || _0xd321xa [_0x2741 [0]] == 21 ){return c;}; if(_0xd321xa [_0x2741 [0]] == 22 || _0xd321xa [_0x2741 [0]] == 23 || _0xd321xa [_0x2741 [0]] == 24){return d;};返回a;};

提前致谢

2 个答案:

答案 0 :(得分:1)

您可以使用http://jsbeautifier.org/等美化设备以更好的方式查看代码。您还可以将其粘贴到firebug或Google Chrome工具中,以评估转义的文本。例如,var _0x2741=["\x69\x64","\x63\x65\x69\x6C","\x6C\x65\x76\x65\x6C"];表示var _0x2741=["id", "ceil", "level"]

答案 1 :(得分:0)

这是我能做的最好的事情,因为我真的不知道Math_0x2741是什么:

var _0x2741 = ["id", "ceil", "level"];
var LoyaltyCoefficient = [0, 1, 4, 12, 24, 0];
var LoyaltyCoefficient1 = [0, 1, 3, 6, 12, 0];
var LoyaltyCoefficient2 = [0, 1, 4, 12, 24, 0];
var LoyaltyCoefficient3 = [0, 1, 4, 12, 24, 0];
var a;
var b;
var c;
var d;

function get_loyality_max(input) {
    a = (20 + Math_0x2741[1] * 10) * LoyaltyCoefficient[input["level"]];
    b = (220 + Math_0x2741[1] * 10) * LoyaltyCoefficient1[input["level"]];
    c = (15 + Math_0x2741[1] * 5) * LoyaltyCoefficient2[input["level"]];
    d = (20 + Math_0x2741[1] * 5) * LoyaltyCoefficient3[input["level"]];
    if (input["id"] == 16 || input["id"] == 17 || input["id"] == 18) {
        return b;
    };
    if (input["id"] == 19 || input["id"] == 20 || input["id"] == 21) {
        return c;
    };
    if (input["id"] == 22 || input["id"] == 23 || input["id"] == 24) {
        return d;
    };
    return a;
};