一段js加密代码
一段js加密代码,望JS大神提供解密思路,
var __encode = 'jsjiami.com',
_a = {},
_0xb483 = ["_decode", "http://www.sojson.com/javascriptobfuscator.html"];
(function(_0xd642x1) {
_0xd642x1] = _0xb483
})(_a);
var __Oxb7f82 = ["resize", "https://oss.cdblmkq.com", "width", "round", "css", "html", "click", ".jump-swt", "on", "body", "", "&cv=", "https://rgak7.kuaishang.cn/bs/im/78253/61107/836424.htm?dp=", "?", "split", "href", "location", "&cSourceTitle=", "title", "attr", "open", "#", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "random", "ease-out-back", "init", "test", "undefined", "now", "timeoutTimer", "intervalTimer", "name", "storage", "getTime", "assign", "expires", "stringify", "setItem", "value", "call", "toString", "prototype", "", "", "getItem", "parse", "startTime", "removeItem", "clear", "oncontextmenu", "document", "onkeydown", "onkeyup", "onkeypress", "event", "arguments", "caller", "callee", "keyCode", "code", "F12", "returnValue", "length", "debugger", "constructor", "log", "删除", "版本号,js会定", "期弹窗,", "还请支持我们的工作", "jsjia", "mi.com"];
$(window)](function() {
htmlFontSize()
});
let oss = __Oxb7f82;
function htmlFontSize() {
$(__Oxb7f82)]({
'font-size': Math](($(window)]() / 2560) * 100000000) / 1000000
})
}
$(__Oxb7f82)](__Oxb7f82, __Oxb7f82, function() {
jumpSwt()
});
function jumpSwt(_0x3490x4 = __Oxb7f82) {
let _0x3490x5 = _0x3490x4 ? __Oxb7f82 + _0x3490x4 : __Oxb7f82;
window](__Oxb7f82 + window]]](__Oxb7f82) + __Oxb7f82 + $(document)](__Oxb7f82) + _0x3490x5)
}
htmlFontSize();
function getColor() {
var _0x3490x7 = __Oxb7f82;
var _0x3490x8 = , __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82, __Oxb7f82];
for (var _0x3490x9 = 0; _0x3490x9 < 6; _0x3490x9++) {
var _0x3490xa = parseInt(Math]() * 16);
_0x3490x7 += _0x3490x8
};
return _0x3490x7
}
function aosInit() {
AOS]({
offset: 200,
easing: __Oxb7f82,
duration: 1500
})
}
function isChinaName(_0x3490xd) {
let _0x3490xe = /^[一-龥]{1,6}$/;
return _0x3490xe](_0x3490xd)
}
function isCardNo(_0x3490x10) {
let _0x3490xe = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
return _0x3490xe](_0x3490x10)
}
function isPhoneNo(_0x3490x12) {
let _0x3490xe = /^1\d{9}$/;
return _0x3490xe](_0x3490x12)
}
function isChinese(_0x3490x14) {
let _0x3490xe = /^[一-龥]+$/;
return _0x3490xe](_0x3490x14)
}
function checkPassWord(_0x3490x16) {
let _0x3490xe = /^[\w]{6,16}$/;
return _0x3490xe](_0x3490x16)
}
function isEmpty(_0x3490x18) {
if (typeof _0x3490x18 == __Oxb7f82 || _0x3490x18 == null || _0x3490x18 == __Oxb7f82) {
return true
} else {
return false
}
}
const RAF = {
intervalTimer: null,
timeoutTimer: null,
setTimeout: function(_0x3490x1a, _0x3490x1b) {
let _0x3490x1c = Date];
let _0x3490x1d = _0x3490x1c();
let _0x3490x1e = _0x3490x1d;
let _0x3490x1f = () => {
this] = requestAnimationFrame(_0x3490x1f);
_0x3490x1e = _0x3490x1c();
if (_0x3490x1e - _0x3490x1d >= _0x3490x1b) {
_0x3490x1a();
cancelAnimationFrame(this])
}
};
this] = requestAnimationFrame(_0x3490x1f);
return this]
},
clearTimeout: function() {
cancelAnimationFrame(this])
},
setInterval: function(_0x3490x1a, _0x3490x1b) {
let _0x3490x1c = Date];
let _0x3490x1d = _0x3490x1c();
let _0x3490x1e = _0x3490x1d;
let _0x3490x1f = () => {
this] = requestAnimationFrame(_0x3490x1f);
_0x3490x1e = _0x3490x1c();
if (_0x3490x1e - _0x3490x1d >= _0x3490x1b) {
_0x3490x1d = _0x3490x1c();
_0x3490x1e = _0x3490x1d;
_0x3490x1a()
}
};
this] = requestAnimationFrame(_0x3490x1f);
return this]
},
clearInterval: function() {
cancelAnimationFrame(this])
}
};
class Storage {
constructor(_0x3490xd) {
this] = __Oxb7f82
}
setItem(_0x3490x22) {
let _0x3490x18 = {
name: __Oxb7f82,
value: __Oxb7f82,
expires: __Oxb7f82,
startTime: new Date()]()
};
let _0x3490x23 = {};
Object](_0x3490x23, _0x3490x18, _0x3490x22);
if (_0x3490x23]) {
localStorage](_0x3490x23], JSON](_0x3490x23))
} else {
let _0x3490x24 = Object]]](_0x3490x23]);
if (Object]]](_0x3490x23]) == __Oxb7f82) {
_0x3490x23] = JSON](_0x3490x23])
};
if (Object]]](_0x3490x23]) == __Oxb7f82) {
_0x3490x23] = JSON](_0x3490x23])
};
localStorage](_0x3490x23], _0x3490x23])
}
}
getItem(_0x3490xd) {
let _0x3490x26 = localStorage](_0x3490xd);
if (!_0x3490x26) {
return false
};
try {
_0x3490x26 = JSON](_0x3490x26)
} catch (error) {
_0x3490x26 = _0x3490x26
};
if (_0x3490x26]) {
let _0x3490x27 = new Date()]();
if (_0x3490x27 - _0x3490x26] > _0x3490x26]) {
localStorage](_0x3490xd);
return false
} else {
return _0x3490x26]
}
} else {
return _0x3490x26
}
}
removeItem(_0x3490xd) {
localStorage](_0x3490xd)
}
clear() {
localStorage]()
}
};
window]] = function() {
return false
};
document] = document] = document] = function(_0x3490x2a) {
var _0x3490x2b = _0x3490x2a || window] || arguments]]];
if (_0x3490x2b && (_0x3490x2b] === 123 || _0x3490x2b] === __Oxb7f82)) {
_0x3490x2b] = false;
return false
}
};
setInterval(function() {
check()
}, 4000);
let check = function() {
function _0x3490x2d(_0x3490x2e) {
if ((__Oxb7f82 + _0x3490x2e / _0x3490x2e)] !== 1 || _0x3490x2e % 20 === 0) {
(function() {}](__Oxb7f82)())
} else {
(function() {}](__Oxb7f82)())
};
_0x3490x2d(++_0x3490x2e)
}
try {
_0x3490x2d(0)
} catch (err) {}
};
check();;;
(function(_0x3490x2f, _0x3490x30, _0x3490x31, _0x3490x32, _0x3490x33, _0x3490x34) {
_0x3490x34 = __Oxb7f82;
_0x3490x32 = function(_0x3490x35) {
if (typeof alert !== _0x3490x34) {
alert(_0x3490x35)
};
if (typeof console !== _0x3490x34) {
console](_0x3490x35)
}
};
_0x3490x31 = function(_0x3490x2e, _0x3490x2f) {
return _0x3490x2e + _0x3490x2f
};
_0x3490x33 = _0x3490x31(__Oxb7f82, _0x3490x31(_0x3490x31(__Oxb7f82, __Oxb7f82), __Oxb7f82));
try {
_0x3490x2f = __encode;
if (!(typeof _0x3490x2f !== _0x3490x34 && _0x3490x2f === _0x3490x31(__Oxb7f82, __Oxb7f82))) {
_0x3490x32(_0x3490x33)
}
} catch (e) {
_0x3490x32(_0x3490x33)
}
})({}) 不要用那些垃圾的通用的一键解密,正则表达式都被破坏了
思路放到控制台,设置个变量,把替换出去的补回来
假设代码变量为“code”,
运行最前面的初始化部分(开头到htmlFontSize函数定义之前的部分)
console.log(code.replace(/__Oxb7f82\+\]/g,a=>{
a=`"${eval(a).replace(/"/g,"\"")}"`;
console.log(a);
return a
}))
上面一小段代码即可输出替换回字符串的代码到控制台
然后再手动删除一下垃圾代码
然后如果xxx["yyy"]这种看的不习惯就改成xxx.yyy
console.log(code.replace(/__Oxb7f82\+\]/g,a=>{
a=`"${eval(a).replace(/"/g,"\"")}"`;
console.log(a);
return a
}).replace(/\[^"']+['"]\s*\]/g,a=>{
a=a.trim();
a=a.substring(2,a.length-2)
console.log(a);
return "."+a
}))
然后再输出
$(window).resize(function() {
htmlFontSize()
});
let oss = "https://oss.cdblmkq.com";
function htmlFontSize() {
$("html").css({
'font-size': Math.round(($(window).width() / 2560) * 100000000) / 1000000
})
}
$("body").on("click", ".jump-swt", function() {
jumpSwt()
});
function jumpSwt(_0x3490x4 = "") {
let _0x3490x5 = _0x3490x4 ? "&cv=" + _0x3490x4 : "";
window.open("https://rgak7.kuaishang.cn/bs/im/78253/61107/836424.htm?dp=" + window.location.href.split("?") + "&cSourceTitle=" + $(document).attr("title") + _0x3490x5)
}
htmlFontSize();
function getColor() {
var _0x3490x7 = "#";
var _0x3490x8 = ["1", "2", "3", "4", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
for (var _0x3490x9 = 0; _0x3490x9 < 6; _0x3490x9++) {
var _0x3490xa = parseInt(Math.random() * 16);
_0x3490x7 += _0x3490x8
};
return _0x3490x7
}
function aosInit() {
AOS.init({
offset: 200,
easing: "ease-out-back",
duration: 1500
})
}
function isChinaName(_0x3490xd) {
let _0x3490xe = /^[\u4E00-\u9FA5]{1,6}$/;
return _0x3490xe.test(_0x3490xd)
}
function isCardNo(_0x3490x10) {
let _0x3490xe = /(^d{15}$)|(^d{18}$)|(^d{17}(d|X|x)$)/;
return _0x3490xe.test(_0x3490x10)
}
function isPhoneNo(_0x3490x12) {
let _0x3490xe = /^1d{9}$/;
return _0x3490xe.test(_0x3490x12)
}
function isChinese(_0x3490x14) {
let _0x3490xe = /^[\u4E00-\u9FA5]+$/;
return _0x3490xe.test(_0x3490x14)
}
function checkPassWord(_0x3490x16) {
let _0x3490xe = /^{6,16}$/;
return _0x3490xe.test(_0x3490x16)
}
function isEmpty(_0x3490x18) {
if (typeof _0x3490x18 == "undefined" || _0x3490x18 == null || _0x3490x18 == "") {
return true
} else {
return false
}
}
const RAF = {
intervalTimer: null,
timeoutTimer: null,
setTimeout: function(_0x3490x1a, _0x3490x1b) {
let _0x3490x1c = Date.now;
let _0x3490x1d = _0x3490x1c();
let _0x3490x1e = _0x3490x1d;
let _0x3490x1f = () => {
this.timeoutTimer = requestAnimationFrame(_0x3490x1f);
_0x3490x1e = _0x3490x1c();
if (_0x3490x1e - _0x3490x1d >= _0x3490x1b) {
_0x3490x1a();
cancelAnimationFrame(this.timeoutTimer)
}
};
this.timeoutTimer = requestAnimationFrame(_0x3490x1f);
return this.timeoutTimer
},
clearTimeout: function() { cancelAnimationFrame(this.timeoutTimer) },
setInterval: function(_0x3490x1a, _0x3490x1b) {
let _0x3490x1c = Date.now;
let _0x3490x1d = _0x3490x1c();
let _0x3490x1e = _0x3490x1d;
let _0x3490x1f = () => {
this.intervalTimer = requestAnimationFrame(_0x3490x1f);
_0x3490x1e = _0x3490x1c();
if (_0x3490x1e - _0x3490x1d >= _0x3490x1b) {
_0x3490x1d = _0x3490x1c();
_0x3490x1e = _0x3490x1d;
_0x3490x1a()
}
};
this.intervalTimer = requestAnimationFrame(_0x3490x1f);
return this.intervalTimer
},
clearInterval: function() { cancelAnimationFrame(this.intervalTimer) }
};
class Storage {
constructor(_0x3490xd) {
this.name = "storage"
}
setItem(_0x3490x22) {
let _0x3490x18 = {
name: "",
value: "",
expires: "",
startTime: new Date().getTime()
};
let _0x3490x23 = {};
Object.assign(_0x3490x23, _0x3490x18, _0x3490x22);
if (_0x3490x23.expires) {
localStorage.setItem(_0x3490x23.name, JSON.stringify(_0x3490x23))
} else {
let _0x3490x24 = Object.prototype.toString.call(_0x3490x23.value);
if (Object.prototype.toString.call(_0x3490x23.value) == "") {
_0x3490x23.value = JSON.stringify(_0x3490x23.value)
};
if (Object.prototype.toString.call(_0x3490x23.value) == "") {
_0x3490x23.value = JSON.stringify(_0x3490x23.value)
};
localStorage.setItem(_0x3490x23.name, _0x3490x23.value)
}
}
getItem(_0x3490xd) {
let _0x3490x26 = localStorage.getItem(_0x3490xd);
if (!_0x3490x26) {
return false
};
try {
_0x3490x26 = JSON.parse(_0x3490x26)
} catch (error) {
_0x3490x26 = _0x3490x26
};
if (_0x3490x26.startTime) {
let _0x3490x27 = new Date().getTime();
if (_0x3490x27 - _0x3490x26.startTime > _0x3490x26.expires) {
localStorage.removeItem(_0x3490xd);
return false
} else {
return _0x3490x26.value
}
} else {
return _0x3490x26
}
}
removeItem(_0x3490xd) {
localStorage.removeItem(_0x3490xd)
}
clear() {
localStorage.clear()
}
};
window.document.oncontextmenu = function() {
return false
};
document.onkeydown = document.onkeyup = document.onkeypress = function(_0x3490x2a) {
var _0x3490x2b = _0x3490x2a || window.event || arguments.callee.caller.arguments;
if (_0x3490x2b && (_0x3490x2b.keyCode === 123 || _0x3490x2b.code === "F12")) {
_0x3490x2b.returnValue = false;
return false
}
}; 排面啊老哥,版主给你回复,赶紧把你的CB交出来吧,论坛要回收。{:301_971:} 果然!大神出手轻松解决{:1_921:}{:1_921:}{:1_921:}
页:
[1]