js 编程 请大神讲解这个js代码的加密原理 能否还原源代码
js 编程请大神讲解这个js代码的加密原理 能否还原源代码var a0_0x1760 = ['37QDHQfk', 'msg', '938740DscJDf', 'payload', 'aud', 'iatFomat', 'slice', 'iss', 'getMilliseconds', 'item', 'value', 'indexOf', 'getMinutes', 'getHours', 'exp', 'getSeconds', 'action', 'pres', '37959MDyERk', 'iat', 'length', 'stringify', 'while\x20(true)\x20{}', 'constructor', '1TWGCCT', 'floor', 'apply', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjpbeyJ1cmwiOiJodHRwczovL3Rvb2x0dC5jb20ifV0sImlhdCI6MTY0NjExMDgwNSwiZXhwIjoyNTU2MTE1MTk5LCJhdWQiOiIiLCJpc3MiOiJ0b29sdHQuY29tIiwic3ViIjoiIn0.NhUwqiPfYey9pKHSfrG-ptqEOamIQFK3-K7IrTeBFYU', 'getDate', 'debu', '3fMvnJq', 'yyyy-MM-dd\x20hh:mm:ss', '10895ZBnlbk', 'test', 'substr', '292217iBRLoQ', 'sub', 'charCodeAt', 'stateObject', '#app', 'replace', 'token必填', 'split', 'init', 'token', '2MCcnLE', 'jsonres', 'return\x20(function()\x20', 'chain', '1333812RNmsRi', 'fromCharCode', '802436yNBSJm', 'getFullYear', 'convert', '126326rhkSCw', 'hres', 'tVodolkItqFZtZ.com;vWtogolttz.cKnX;miGqRfhyuncB.coGysmNpbj;Jwww.LMmzEifyUunXc.cQomLYpGSaBHBpJpUVTvKsLHBTdzQWNDvbYhMaIUHppeAWRKpzeUxdBGeEzbSKZxEzPqxaSzXxXxsg', '31vToMjN', 'string', 'function\x20*\x5c(\x20*\x5c)', 'getMonth', 'attribute', 'header', 'tooltt', 'gger', 'prototype', 'alg', 'format'];
var a0_0x5a37 = function(_0x358ea0, _0xc7d1b5) {
_0x358ea0 = _0x358ea0 - 0x104;
var _0x4860c0 = a0_0x1760;
return _0x4860c0;
};
var a0_0xd9da9b = a0_0x5a37;
(function(_0x1647eb, _0x4a3097) {
var _0x186d79 = a0_0x5a37;
while (!![]) {
try {
var _0x4aa367 = -parseInt(_0x186d79(0x134)) * parseInt(_0x186d79(0x12b)) + -parseInt(_0x186d79(0x12f)) + -parseInt(_0x186d79(0x116)) * -parseInt(_0x186d79(0x131)) + parseInt(_0x186d79(0x144)) + -parseInt(_0x186d79(0x137)) * -parseInt(_0x186d79(0x110)) + parseInt(_0x186d79(0x11c)) * -parseInt(_0x186d79(0x121)) + -parseInt(_0x186d79(0x142)) * -parseInt(_0x186d79(0x11e));
if (_0x4aa367 === _0x4a3097)
break;
else
_0x1647eb['push'](_0x1647eb['shift']());
} catch (_0x13bc2f) {
_0x1647eb['push'](_0x1647eb['shift']());
}
}
}(a0_0x1760, 0xd1731));
var a0_0x1a20ef = function() {
var _0x4f8f86 = !![];
return function(_0x414e7e, _0x4b987a) {
var _0x23f36b = _0x4f8f86 ? function() {
var _0x590f00 = a0_0x5a37;
if (_0x4b987a) {
var _0x18e529 = _0x4b987a(_0x414e7e, arguments);
return _0x4b987a = null,
_0x18e529;
}
}
: function() {}
;
return _0x4f8f86 = ![],
_0x23f36b;
}
;
}()
, a0_0x513fc9 = a0_0x1a20ef(this, function() {
var _0x17d804 = a0_0x5a37, _0x463630;
try {
var _0x5ed567 = Function(_0x17d804(0x12d) + '{}.constructor(\x22return\x20this\x22)(\x20)' + ');');
_0x463630 = _0x5ed567();
} catch (_0x3ad92f) {
_0x463630 = window;
}
var _0x5a7661 = function() {
var _0x3f25e0 = _0x17d804;
return {
'key': _0x3f25e0(0x107),
'value': _0x3f25e0(0x13b),
'getAttribute': function() {
var _0x4c4088 = _0x3f25e0;
for (var _0x5cbff9 = 0x0; _0x5cbff9 < 0x3e8; _0x5cbff9--) {
var _0x24d39d = _0x5cbff9 > 0x0;
switch (_0x24d39d) {
case !![]:
return this + '_' + this + '_' + _0x5cbff9;
default:
this + '_' + this;
}
}
}()
};
}, _0xac4126 = new RegExp('','g'), _0x3f1168 = _0x17d804(0x136)(_0xac4126, '')(';'), _0x340fa8, _0x3ce6ef, _0x4449da, _0x368344;
for (var _0x23aa6b in _0x463630) {
if (_0x23aa6b['length'] == 0x8 && _0x23aa6b(0x7) == 0x74 && _0x23aa6b(0x5) == 0x65 && _0x23aa6b['charCodeAt'](0x3) == 0x75 && _0x23aa6b['charCodeAt'](0x0) == 0x64) {
_0x340fa8 = _0x23aa6b;
break;
}
}
for (var _0x1bb2dd in _0x463630) {
if (_0x1bb2dd['length'] == 0x6 && _0x1bb2dd(0x5) == 0x6e && _0x1bb2dd(0x0) == 0x64) {
_0x3ce6ef = _0x1bb2dd;
break;
}
}
if (!('~' > _0x3ce6ef)) {
for (var _0x1be2b7 in _0x463630) {
if (_0x1be2b7 == 0x8 && _0x1be2b7(0x7) == 0x6e && _0x1be2b7(0x0) == 0x6c) {
_0x4449da = _0x1be2b7;
break;
}
}
for (var _0x4bb6f1 in _0x463630) {
if (_0x4bb6f1 == 0x8 && _0x4bb6f1(0x7) == 0x65 && _0x4bb6f1(0x0) == 0x68) {
_0x368344 = _0x4bb6f1;
break;
}
}
}
if (!_0x340fa8 || !_0x463630)
return;
var _0x49290e = _0x463630
, _0x28fa2f = !!_0x463630 && _0x463630
, _0xe3abb7 = _0x49290e || _0x28fa2f;
if (!_0xe3abb7)
return;
var _0x366874 = ![];
for (var _0x1968dd = 0x0; _0x1968dd < _0x3f1168['length']; _0x1968dd++) {
var _0x3ce6ef = _0x3f1168
, _0xf551bd = _0x3ce6ef === String(0x2e) ? _0x3ce6ef(0x1) : _0x3ce6ef
, _0x526685 = _0xe3abb7['length'] - _0xf551bd['length']
, _0x358a92 = _0xe3abb7(_0xf551bd, _0x526685)
, _0x4e97d7 = _0x358a92 !== -0x1 && _0x358a92 === _0x526685;
_0x4e97d7 && ((_0xe3abb7 == _0x3ce6ef || _0x3ce6ef('.') === 0x0) && (_0x366874 = !![]));
}
if (!_0x366874)
data;
else
return;
_0x5a7661();
});
a0_0x513fc9();
var a0_0x20abfa = function() {
var _0x53fe0a = !![];
return function(_0x183ee0, _0xd46bba) {
var _0x5a961b = _0x53fe0a ? function() {
var _0x243fb2 = a0_0x5a37;
if (_0xd46bba) {
var _0x8cc495 = _0xd46bba(_0x183ee0, arguments);
return _0xd46bba = null,
_0x8cc495;
}
}
: function() {}
;
return _0x53fe0a = ![],
_0x5a961b;
}
;
}();
(function() {
a0_0x20abfa(this, function() {
var _0x17ff91 = a0_0x5a37
, _0x25994a = new RegExp(_0x17ff91(0x139))
, _0xb626b8 = new RegExp('\x5c+\x5c+\x20*(?:*)','i')
, _0x5745b7 = a0_0x5a3eef(_0x17ff91(0x129));
!_0x25994a['test'](_0x5745b7 + _0x17ff91(0x12e)) || !_0xb626b8['test'](_0x5745b7 + 'input') ? _0x5745b7('0') : a0_0x5a3eef();
})();
}(),
app = new Vue({
'el': a0_0xd9da9b(0x125),
'data': {
'token': '',
'alg': '',
'iss': '',
'iat': '',
'iatFomat': '',
'exp': '',
'expFomat': '',
'aud': '',
'sub': '',
'secret': a0_0xd9da9b(0x13d),
'hres': '',
'pres': '',
'result': ''
},
'methods': {
'convert': function() {
var _0x1f6670 = a0_0xd9da9b;
if ('' == this) {
layer(_0x1f6670(0x127), function() {});
return;
}
var _0x515681 = {}
, _0x4ce006 = jwt['decode'](this, {
'complete': !![]
});
console['log'](_0x4ce006);
var _0x5701db = _0x4ce006
, _0x4f8e31 = _0x4ce006;
_0x515681 = _0x5701db,
_0x515681 = _0x4f8e31,
this = _0x5701db,
this = _0x4f8e31 !== undefined ? _0x4f8e31 : '',
this = _0x4f8e31 !== undefined ? _0x4f8e31 : '',
this = new Date(_0x4f8e31['iat'] * 0x3e8)['format'](_0x1f6670(0x11d)),
this = _0x4f8e31 !== undefined ? _0x4f8e31['exp'] : '',
this['expFomat'] = new Date(_0x4f8e31 * 0x3e8)(_0x1f6670(0x11d)),
this = _0x4f8e31 !== undefined ? _0x4f8e31['aud'] : '',
this = _0x4f8e31 !== undefined ? _0x4f8e31 : '',
this = JSON(_0x5701db, null, 0x2),
this = JSON['stringify'](_0x4f8e31, null, 0x2),
this = JSON(_0x515681, null, 0x2);
},
'demo': function() {
var _0x2dfd64 = a0_0xd9da9b;
this = _0x2dfd64(0x119),
this();
}
}
}),
Date = function(_0x3c62b5) {
var _0x3b5821 = a0_0xd9da9b
, _0xebc093 = {
'M+': this() + 0x1,
'd+': this(),
'h+': this(),
'm+': this(),
's+': this(),
'q+': Math((this() + 0x3) / 0x3),
'S': this()
};
/(y+)/(_0x3c62b5) && (_0x3c62b5 = _0x3c62b5(RegExp['$1'], (this() + '')(0x4 - RegExp['$1'])));
for (var _0x2fdaf1 in _0xebc093) {
new RegExp('(' + _0x2fdaf1 + ')')(_0x3c62b5) && (_0x3c62b5 = _0x3c62b5['replace'](RegExp['$1'], RegExp['$1']['length'] == 0x1 ? _0xebc093 : ('00' + _0xebc093)(('' + _0xebc093)['length'])));
}
return _0x3c62b5;
}
);
function a0_0x5a3eef(_0x26c3e9) {
function _0x5cabab(_0x3c4f0a) {
var _0x59c2b0 = a0_0x5a37;
if (typeof _0x3c4f0a === _0x59c2b0(0x138))
return function(_0x212c2b) {}
(_0x59c2b0(0x114))('counter');
else
('' + _0x3c4f0a / _0x3c4f0a) !== 0x1 || _0x3c4f0a % 0x14 === 0x0 ? function() {
return !![];
}
('debu' + _0x59c2b0(0x13e))['call'](_0x59c2b0(0x10e)) : function() {
return ![];
}
(_0x59c2b0(0x11b) + _0x59c2b0(0x13e))(_0x59c2b0(0x124));
_0x5cabab(++_0x3c4f0a);
}
try {
if (_0x26c3e9)
return _0x5cabab;
else
_0x5cabab(0x0);
} catch (_0x37b000) {}
}
setInterval(function() {
a0_0x5a3eef();
}, 0xfa0);
只能还原逻辑,不能还原为源码 混淆就是按照一定的方法拐弯抹角表达原有的逻辑,压缩是将较长的变量替换成较短的,js加密通常就是二者混用产生的结果 看着挺难的 var a0_0x1760 = ['37QDHQfk', 'msg', '938740DscJDf', 'payload', 'aud', 'iatFomat', 'slice', 'iss', 'getMilliseconds', 'item', 'value', 'indexOf', 'getMinutes', 'getHours', 'exp', 'getSeconds', 'action', 'pres', '37959MDyERk', 'iat', 'length', 'stringify', "while (true) {}", 'constructor', '1TWGCCT', 'floor', 'apply', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjpbeyJ1cmwiOiJodHRwczovL3Rvb2x0dC5jb20ifV0sImlhdCI6MTY0NjExMDgwNSwiZXhwIjoyNTU2MTE1MTk5LCJhdWQiOiIiLCJpc3MiOiJ0b29sdHQuY29tIiwic3ViIjoiIn0.NhUwqiPfYey9pKHSfrG-ptqEOamIQFK3-K7IrTeBFYU', 'getDate', 'debu', '3fMvnJq', "yyyy-MM-dd hh:mm:ss", '10895ZBnlbk', 'test', 'substr', '292217iBRLoQ', 'sub', 'charCodeAt', 'stateObject', '#app', 'replace', 'token必填', 'split', 'init', 'token', '2MCcnLE', 'jsonres', "return (function() ", 'chain', '1333812RNmsRi', 'fromCharCode', '802436yNBSJm', 'getFullYear', 'convert', '126326rhkSCw', 'hres', 'tVodolkItqFZtZ.com;vWtogolttz.cKnX;miGqRfhyuncB.coGysmNpbj;Jwww.LMmzEifyUunXc.cQomLYpGSaBHBpJpUVTvKsLHBTdzQWNDvbYhMaIUHppeAWRKpzeUxdBGeEzbSKZxEzPqxaSzXxXxsg', '31vToMjN', 'string', "function *\\( *\\)", 'getMonth', 'attribute', 'header', 'tooltt', 'gger', 'prototype', 'alg', 'format'];
var a0_0x5a37 = function (_0x358ea0, _0xc7d1b5) {
_0x358ea0 = _0x358ea0 - 260;
var _0x4860c0 = a0_0x1760;
return _0x4860c0;
};
(function (_0x1647eb, _0x4a3097) {
while (true) {
try {
var _0x4aa367 = -parseInt(a0_0x5a37(308)) * parseInt(a0_0x5a37(299)) + -parseInt(a0_0x5a37(303)) + -parseInt(a0_0x5a37(278)) * -parseInt(a0_0x5a37(305)) + parseInt(a0_0x5a37(324)) + -parseInt(a0_0x5a37(311)) * -parseInt(a0_0x5a37(272)) + parseInt(a0_0x5a37(284)) * -parseInt(a0_0x5a37(289)) + -parseInt(a0_0x5a37(322)) * -parseInt(a0_0x5a37(286));
if (_0x4aa367 === _0x4a3097) {
break;
} else {
_0x1647eb['push'](_0x1647eb['shift']());
}
} catch (_0x13bc2f) {
_0x1647eb['push'](_0x1647eb['shift']());
}
}
})(a0_0x1760, 857905);
var a0_0x1a20ef = function () {
var _0x4f8f86 = true;
return function (_0x414e7e, _0x4b987a) {
var _0x23f36b = _0x4f8f86 ? function () {
if (_0x4b987a) {
var _0x18e529 = _0x4b987a(_0x414e7e, arguments);
_0x4b987a = null;
return _0x18e529;
}
} : function () {};
_0x4f8f86 = false;
return _0x23f36b;
};
}();
var a0_0x20abfa = function () {
var _0x53fe0a = true;
return function (_0x183ee0, _0xd46bba) {
var _0x5a961b = _0x53fe0a ? function () {
if (_0xd46bba) {
var _0x8cc495 = _0xd46bba(_0x183ee0, arguments);
_0xd46bba = null;
return _0x8cc495;
}
} : function () {};
_0x53fe0a = false;
return _0x5a961b;
};
}();
app = new Vue({
'el': a0_0x5a37(293),
'data': {
'token': '',
'alg': '',
'iss': '',
'iat': '',
'iatFomat': '',
'exp': '',
'expFomat': '',
'aud': '',
'sub': '',
'secret': a0_0x5a37(317),
'hres': '',
'pres': '',
'result': ''
},
'methods': {
'convert': function () {
if ('' == this) {
layer(a0_0x5a37(295), function () {});
return;
}
var _0x515681 = {},
_0x4ce006 = jwt['decode'](this, {
'complete': true
});
console['log'](_0x4ce006);
var _0x5701db = _0x4ce006,
_0x4f8e31 = _0x4ce006;
_0x515681 = _0x5701db;
_0x515681 = _0x4f8e31;
this = _0x5701db;
this = _0x4f8e31 !== undefined ? _0x4f8e31 : '';
this = _0x4f8e31 !== undefined ? _0x4f8e31 : '';
this = new Date(_0x4f8e31['iat'] * 1000)['format'](a0_0x5a37(285));
this = _0x4f8e31 !== undefined ? _0x4f8e31['exp'] : '';
this['expFomat'] = new Date(_0x4f8e31 * 1000)(a0_0x5a37(285));
this = _0x4f8e31 !== undefined ? _0x4f8e31['aud'] : '';
this = _0x4f8e31 !== undefined ? _0x4f8e31 : '';
this = JSON(_0x5701db, null, 2);
this = JSON['stringify'](_0x4f8e31, null, 2);
this = JSON(_0x515681, null, 2);
},
'demo': function () {
this = a0_0x5a37(281);
this();
}
}
});
Date = function (_0x3c62b5) {
var _0xebc093 = {
'M+': this() + 1,
'd+': this(),
'h+': this(),
'm+': this(),
's+': this(),
'q+': Math((this() + 3) / 3),
'S': this()
};
/(y+)/(_0x3c62b5) && (_0x3c62b5 = _0x3c62b5(RegExp['$1'], (this() + '')(4 - RegExp['$1'])));
for (var _0x2fdaf1 in _0xebc093) {
new RegExp('(' + _0x2fdaf1 + ')')(_0x3c62b5) && (_0x3c62b5 = _0x3c62b5['replace'](RegExp['$1'], RegExp['$1']['length'] == 1 ? _0xebc093 : ('00' + _0xebc093)(('' + _0xebc093)['length'])));
}
return _0x3c62b5;
};
function a0_0x5a3eef(_0x26c3e9) {
function _0x5cabab(_0x3c4f0a) {
if (typeof _0x3c4f0a === a0_0x5a37(312)) {
return function (_0x212c2b) {}(a0_0x5a37(276))('counter');
} else {
('' + _0x3c4f0a / _0x3c4f0a) !== 1 || _0x3c4f0a % 20 === 0 ? function () {
return true;
}('debu' + a0_0x5a37(318))['call'](a0_0x5a37(270)) : function () {
return false;
}(a0_0x5a37(283) + a0_0x5a37(318))(a0_0x5a37(292));
}
_0x5cabab(++_0x3c4f0a);
}
try {
if (_0x26c3e9) {
return _0x5cabab;
} else {
_0x5cabab(0);
}
} catch (_0x37b000) {}
}
setInterval(function () {
a0_0x5a3eef();
}, 4000); 支持支持!!
支持支持!! 难得还有这么标准的混淆,用AST解析一下,把加密的地方都还原
页:
[1]