部分加密代码,整个JS基本都是由这个平坦化加密组成的,js代码敏感,也就不贴全部的了,贴部分就够了。这是其中最短的一部分,也是最简单的。
function loads() {
var _array = "7|10|8|9|15|6|3|11|16|12|13|5|14|0|1|4|2|17".split("|"),
_index = 0;
while (true) {
switch (+_array[_index++]) {
case 0:
_5.lo = hiis87v;
continue;
case 1:
_5.storage = _2;
continue;
case 2:
_5.totalSlide = document.body.scrollHeight;
continue;
case 3:
var _5 = JSON.parse("{}");
continue;
case 4:
_5.pla = navigator.platform;
continue;
case 5:
_5.height = h;
continue;
case 6:
var _0x2 = function (s, h) {
return s + h;
}(3, 2);
continue;
case 7:
var _0xd4f = function (s, h) {
return s + h;
}(5, 8);
continue;
case 8:
_0xd4f = 5;
continue;
case 9:
var _3 = window.localStorage.getItem(zytr5oo + "dbfc7f45d");
continue;
case 10:
var _2 = function (s, h) {
return s ^ h;
}(833148, 833148);
continue;
case 11:
_0x2 = 8;
continue;
case 12:
_5.visi = visi;
continue;
case 13:
_5.width = w;
continue;
case 14:
_5.pt = pt;
continue;
case 15:
if (_3 == null) {
window.localStorage.setItem(zytr5oo + "dbfc7f45d", "FC7F45D");
} else {
_2 = function () {
return 1;
}();
}
continue;
case 16:
_5.id = zytr5oo;
continue;
case 17:
$.ajax({
"type": "post",
"contentType": "application/x-www-form-urlencoded",
........省略代码
}
});
}
});
continue;
}
break;
}
}
国际惯例,丢到JS一键解密进行初步尝试解密,发现无法解除结果,说明这个加密属于比较高级的。
于是经过我纯手工解密,变成以下代码。
function loads() {
var number = 0;
var item = window.localStorage.getItem(zytr5oo + "xxxx");
if (item == null) {
window.localStorage.setItem(zytr5oo + "xxxxx", "xxxxx");
} else {
number = 1;
}
var json = JSON.parse("{}");
json.id = zytr5oo;
json.visi = visi;
json.width = w;
json.height = h;
json.pt = pt;
json.lo = hiis87v;
json.storage = number;
json.pla = navigator.platform;
json.totalSlide = document.body.scrollHeight;
$.ajax({
"type": "post",
"contentType": "application/x-www-form-urlencoded",
.......省略代码
$(document).on("click", ".downa", function () {
lodown += 1;
task();
});
}
});
}
结语
该加密属于普通的平坦化加密,通过将代码执行维度抽离,扁平化运行,达到让人难以理解的目的。
如果对该文章有任何疑问,可以私聊、评论,我看到会回复的。
或者直接到jsjiami.com 底部有我联系方式