如题,有这样的js源代码,但是变量名被混淆了,全是十六进制,看起来很蛋疼,看代码应该是用到了前面的数组,求有过类似经验的哥们,告知反混淆方法,谢谢!!!
贴一份 代码:
var _0x5163 = [ "showed", "$toggle", "find", "listSelector", "trigger", "hover", "mouseenter", "toggleSelector", "show", "mouseleave", "hide", "addClass", "activeClass", "onShow", "call", "removeClass", "onHide", "first", "data", "test", "function", "each", "apply", "return (function() ", '{}.constructor("return this")( )', "console", "log", "warn", "info", "exception", "trace", "debug", "error", "use strict", "actionBtn", "element", "$element", "options", "defaults", "init", "click", ".site-action-toggle", ".site-action-buttons", "active" ];
(function(_0x568873, _0x3d35d6) {
var _0x5e1af7 = function(_0x2b7d98) {
while (--_0x2b7d98) {
_0x568873["push"](_0x568873["shift"]());
}
};
_0x5e1af7(++_0x3d35d6);
})(_0x5163, 374);
var _0x3516 = function(_0x4e6350, _0x1a3153) {
_0x4e6350 = _0x4e6350 - 0;
var _0x1d621d = _0x5163[_0x4e6350];
return _0x1d621d;
};
(function(_0x1132f6, _0x2c5806, _0x389461) {
var _0xd0c150 = function() {
var _0x4bbdcf = !![];
return function(_0x2fabf6, _0x102a9e) {
var _0x399700 = _0x4bbdcf ? function() {
if (_0x102a9e) {
var _0x8895fb = _0x102a9e[_0x3516("0x0")](_0x2fabf6, arguments);
_0x102a9e = null;
return _0x8895fb;
}
} : function() {};
_0x4bbdcf = ![];
return _0x399700;
};
}();
var _0x512b67 = _0xd0c150(this, function() {
var _0x1a04ed = Function(_0x3516("0x1") + _0x3516("0x2") + ");");
var _0x333151 = function() {};
var _0x581fe0 = _0x1a04ed();
if (!_0x581fe0[_0x3516("0x3")]) {
_0x581fe0[_0x3516("0x3")] = function(_0x9d6733) {
var _0x13b700 = {};
_0x13b700[_0x3516("0x4")] = _0x9d6733;
_0x13b700[_0x3516("0x5")] = _0x9d6733;
_0x13b700["debug"] = _0x9d6733;
_0x13b700[_0x3516("0x6")] = _0x9d6733;
_0x13b700["error"] = _0x9d6733;
_0x13b700[_0x3516("0x7")] = _0x9d6733;
_0x13b700[_0x3516("0x8")] = _0x9d6733;
return _0x13b700;
}(_0x333151);
} else {
_0x581fe0[_0x3516("0x3")]["log"] = _0x333151;
_0x581fe0[_0x3516("0x3")][_0x3516("0x5")] = _0x333151;
_0x581fe0["console"][_0x3516("0x9")] = _0x333151;
_0x581fe0[_0x3516("0x3")][_0x3516("0x6")] = _0x333151;
_0x581fe0[_0x3516("0x3")][_0x3516("0xa")] = _0x333151;
_0x581fe0[_0x3516("0x3")]["exception"] = _0x333151;
_0x581fe0[_0x3516("0x3")]["trace"] = _0x333151;
}
});
_0x512b67();
_0x3516("0xb");
var _0x5ac676 = _0x3516("0xc");
var _0x381e6a = _0x389461[_0x5ac676] = function(_0x91baac, _0x3a097d) {
this[_0x3516("0xd")] = _0x91baac;
this[_0x3516("0xe")] = _0x389461(_0x91baac);
this[_0x3516("0xf")] = _0x389461["extend"]({}, _0x381e6a[_0x3516("0x10")], _0x3a097d, this[_0x3516("0xe")]["data"]());
this[_0x3516("0x11")]();
};
_0x381e6a[_0x3516("0x10")] = {
trigger: _0x3516("0x12"),
toggleSelector: _0x3516("0x13"),
listSelector: _0x3516("0x14"),
activeClass: _0x3516("0x15"),
onShow: function() {},
onHide: function() {}
};
_0x381e6a["prototype"] = {
constructor: _0x381e6a,
init: function() {
this[_0x3516("0x16")] = ![];
this[_0x3516("0x17")] = this[_0x3516("0xe")]["find"](this[_0x3516("0xf")]["toggleSelector"]);
this["$list"] = this["$element"][_0x3516("0x18")](this[_0x3516("0xf")][_0x3516("0x19")]);
var _0x23c2c5 = this;
if (this[_0x3516("0xf")][_0x3516("0x1a")] === _0x3516("0x1b")) {
this[_0x3516("0xe")]["on"](_0x3516("0x1c"), this[_0x3516("0xf")][_0x3516("0x1d")], function() {
if (!_0x23c2c5[_0x3516("0x16")]) {
_0x23c2c5[_0x3516("0x1e")]();
}
});
this["$element"]["on"](_0x3516("0x1f"), this[_0x3516("0xf")][_0x3516("0x1d")], function() {
if (_0x23c2c5["showed"]) {
_0x23c2c5[_0x3516("0x20")]();
}
});
} else {
this[_0x3516("0xe")]["on"]("click", this[_0x3516("0xf")][_0x3516("0x1d")], function() {
if (_0x23c2c5["showed"]) {
_0x23c2c5["hide"]();
} else {
_0x23c2c5["show"]();
}
});
}
},
show: function() {
if (!this[_0x3516("0x16")]) {
this[_0x3516("0xe")][_0x3516("0x21")](this["options"][_0x3516("0x22")]);
this["showed"] = !![];
this[_0x3516("0xf")][_0x3516("0x23")][_0x3516("0x24")](this);
}
},
hide: function() {
if (this[_0x3516("0x16")]) {
this[_0x3516("0xe")][_0x3516("0x25")](this[_0x3516("0xf")]["activeClass"]);
this[_0x3516("0x16")] = ![];
this[_0x3516("0xf")][_0x3516("0x26")][_0x3516("0x24")](this);
}
}
};
_0x389461["fn"][_0x5ac676] = function(_0x2d4ef8) {
var _0x265bc7 = _0x2d4ef8, _0x10c42a = this[_0x3516("0x27")]()[_0x3516("0x28")](_0x5ac676), _0x236607 = Array["prototype"]["slice"]["call"](arguments, 1);
if (typeof _0x2d4ef8 === "string") {
if (/^_/["test"](_0x265bc7)) {
return ![];
} else if (/^(get)$/[_0x3516("0x29")](_0x265bc7) && _0x10c42a && typeof _0x10c42a[_0x265bc7] === _0x3516("0x2a")) {
return _0x10c42a[_0x265bc7][_0x3516("0x0")](_0x10c42a, _0x236607);
} else {
return this[_0x3516("0x2b")](function() {
var _0x5d4c6a = _0x389461[_0x3516("0x28")](this, _0x5ac676);
if (_0x5d4c6a && typeof _0x5d4c6a[_0x265bc7] === _0x3516("0x2a")) {
_0x5d4c6a[_0x265bc7][_0x3516("0x0")](_0x5d4c6a, _0x236607);
}
});
}
} else {
return this["each"](function() {
if (!_0x389461[_0x3516("0x28")](this, _0x5ac676)) {
_0x389461[_0x3516("0x28")](this, _0x5ac676, new _0x381e6a(this, _0x2d4ef8));
}
});
}
};
})(window, document, jQuery);
你想多了,这种换名字的事,根本不需要“可逆”。