直接上加密代码
<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="js" cid="n3" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">async function sendReq(_0x2d4d49, _0x178049, _0x4abd97 = null, _0x4a5641 = null) {
const _0x427aa8 = _0x19ce3a;
try {
var _0x179b4c;
if (_0x2d4d49 === _0x427aa8(0x264)) {
if (_0x178049_0x427aa8(0x20c)) _0x178049 += 'key=' + d(COVAL_KEY);
_0x179b4c = await axios['get'](_0x178049, {'headers': _0x178049_0x427aa8(0x20c) ? {'accept': _0x427aa8(0x21e)} : {}});
} else _0x4a5641 = c(_0x4a5641), _0x179b4c = await axios[_0x427aa8(0x229)](_0x178049, {
'payload': _0x4a5641,
'headers': {
'accept': _0x427aa8(0x21e),
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
}
});
return console[_0x427aa8(0x262)](_0x178049, _0x179b4c), _0x179b4c;
} catch (_0x245369) {
console['log'](_0x178049, _0x245369);
if (_0x4abd97) showError(_0x4abd97);
return;
}
}</pre>
解密后
<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="js" cid="n5" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">async function sendReq(type, url, errMsg = null, payload = null) {
try {
var res;
if (type === "get") {
if (url.includes('coval')) {
url += 'key=' + d(COVAL_KEY);
}
res = await axios.get(url, {
'headers': url.includes("coval") ? {
'accept': "application/json"
} : {}
});
} else {
payload = c(payload);
res = await axios.post(url, {
'payload': payload,
'headers': {
'accept': "application/json",
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
}
});
}
console.log(url, res);
return res;
} catch (e) {
console.log(url, e);
if (errMsg) {
showError(errMsg);
}
return;
}
}</pre>
贴出的只是部分代码,想要完整的可以评论留言,我发你。
解密思路记录过程
这个加密还算比较大众,拿到代码二话不说,先丢到jsjiami.com一键解密一遍,如果解不开,或者只能解开一部分,可以去找客服解。(技术牛逼的自己解,一般工具也会解出个大概的)
通过js加密工具解出来的结果,发现这个加密还是比较复杂点的,一键解密只能解出来个大概,将一键解密后的代码复制出来,丢到webstorm里自己人工解一遍,差不多就还原整个代码了。
解密的一些小技改
![] = false
!![] = true
js中还有许多的隐式转换技巧,你学会了吗?
对文章有疑问或者有不同想法的可以在评论区评论出来,或者到www.jsjiami.com找到我的联系方式 网站底部有联系方式