http://www.sufeinet.com/plugin.php?id=keke_group

苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程

HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成

HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子

查看: 14417|回复: 5

[HttpHelper] 有没有人会解密eval的js

[复制链接]
发表于 2020-12-2 21:57:47 | 显示全部楼层 |阅读模式
比如下面这种:

[JavaScript] 纯文本查看 复制代码
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('v w={\'x\':6,\'u\':\'兼职阎王\',\'t\':\'/6/q\',\'r\':\'-1\',\'s\':\'/6/y\',\'z\':\'F话\',\'G\':[\'/3/J/5/4/E-D.2\',\'/3/J/5/4/p.2\',\'/3/J/5/4/B.2\',\'/3/J/5/4/C-H.2\',\'/3/J/5/4/n.2\',\'/3/J/5/4/f.2\',\'/3/J/5/4/c.2\',\'/3/J/5/4/d.2\',\'/3/J/5/4/b.2\',\'/3/J/5/4/a.2\',\'/3/J/5/4/7-8.2\',\'/3/J/5/4/9.2\',\'/3/J/5/4/e.2\',\'/3/J/5/4/g.2\',\'/3/J/5/4/m.2\',\'/3/J/5/4/k-h.2\',\'/3/J/5/4/j.2\',\'/3/J/5/4/o-i.2\',\'/3/J/5/4/l.2\',\'/3/J/5/4/A-11.2\',\'/3/J/5/4/18.2\',\'/3/J/5/4/I.2\',\'/3/J/5/4/19.2\',\'/3/J/5/4/17.2\',\'/3/J/5/4/16.2\',\'/3/J/5/4/13-.2\',\'/3/J/5/4/14.2\',\'/3/J/5/4/1b.2\',\'/3/J/5/4/1a-1h.2\',\'/3/J/5/4/1i.2\',\'/3/J/5/4/1g.2\',\'/3/J/5/4/1f.2\',\'/3/J/5/4/1c-.2\',\'/3/J/5/4/1d.2\',\'/3/J/5/4/1e.2\',\'/3/J/5/4/15.2\',\'/3/J/5/4/12.2\',\'/3/J/5/4/P.2\',\'/3/J/5/4/Q.2\',\'/3/J/5/4/R.2\',\'/3/J/5/4/O-N.2\',\'/3/J/5/4/K.2\',\'/3/J/5/4/L.2\',\'/3/J/5/4/M.2\',\'/3/J/5/4/S.2\',\'/3/J/5/4/T.2\',\'/3/J/5/4/Z.2\',\'/3/J/5/4/10.2\',\'/3/Y.2\'],\'X\':U,\'V\':\'/6/\',\'W\':0};',62,81,'||jpg|ManHuaKu|42buqieryu|JianZhiYanWang|40257|1601989128ejz9|YaRWnHZLrg6|1601989127BeT68jA3XuibOTQ1|1601989129NW3xhmxF9w2BOora|1601989130L9IprKAXZddkyYSy|1601989132CfbPbm2gjTMTKMyS|1601989131OX5rXsZEqAb9NWPJ|1601989125E7MxhGfhBDJ0E8Nj|1601989133FxY_eOfoWdshfP3Z|1601989124ROXw2bOsGQR0nxV0|13amKzoWR|8dcx|1601989121V9MO6scyY3kNzuTJ|1601989122nF0CsT|1601989119hhpjyFqaCIi0w_oD|1601989123h945JZ5FSQfIWkKs|1601989134e2xFd363J8sPs_Oi|1601989120mxAHvYXDtqw|1601989137S8TvtRUaEmmd6zvf|09|ncid|pcid|cid|btitle|var|cInfo|bid|08|ctitle|1601989117QH|1601989136g4suR_Md8kAGZydt|16019891351|WS0PwE7|16019891392syyFZGD|42|fs|tP1lrMQCLzbvmA|1601989116hL74Klxfgw_cWa1F||1601989091x3RNgYHlsZgkSemU|1601989090pGJv3LsHENuLvm5E|1601989089U6McDjOTOPGcv0O1|uP7ufThR|1601989092f1kAlFD|16019890953gIQ6Oy9hI_13Y7x|1601989094OqRVay6sO63SjfHw|1601989093OBWKBWymhKudHXaY|1601989088VkQHsQWFkLlpVsvV|160198908799_8fQ1HxWNajold|49|burl|bs|fc|222|1601989086vaz3rGVUPlMi5bhE|1601989084KQdmF9xVFstG79j0|UjgrrAGIvlkZG|1601989098yIpYKjFiu8jTwq5R|1601989111gshXsikQtH2l2Cf|1601989110pH6nymHP5ITQQmld|1601989099IyI7zbqG2n0WYMc6|1601989112_jlsoOovFmKbhFHE|1601989113flHhyIUSMVM9Yc1f|16019891164VX_pgnrjWN19Jda|1601989114cBUDuPKlguEdWysq|1601989106TXpn_k5T_FPc|16019891089VktxH9I5SvZKuWi|1601989102n7MeyFBrov4vrEO|160198910122mG1AlBJN0CsVUq|1601989100OUfGixttHZ30_49A|1601989103cR03tz1upXDHVyKq|160198910483M50AkYkdoUnvrD|ksR|1601989105o_jX3jreRxe1rTDl'.split('|'),0,{}))


有一些工具是可以直接反js混淆的,比如:https://www.html.cn/tool/js_beautify/
在网页里放入上面的代码以后

var cInfo = {
    'bid': 40257,
    'btitle': '兼职阎王',
    'cid': '/40257/09',
    'ncid': '-1',
    'pcid': '/40257/08',
    'ctitle': '42话',
    'fs': ['/ManHuaKu/J/JianZhiYanWang/42buqieryu/16019891392syyFZGD-WS0PwE7.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989137S8TvtRUaEmmd6zvf.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989136g4suR_Md8kAGZydt.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/16019891351-tP1lrMQCLzbvmA.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989134e2xFd363J8sPs_Oi.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989133FxY_eOfoWdshfP3Z.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989132CfbPbm2gjTMTKMyS.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989131OX5rXsZEqAb9NWPJ.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989130L9IprKAXZddkyYSy.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989129NW3xhmxF9w2BOora.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989128ejz9-YaRWnHZLrg6.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989127BeT68jA3XuibOTQ1.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989125E7MxhGfhBDJ0E8Nj.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989124ROXw2bOsGQR0nxV0.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989123h945JZ5FSQfIWkKs.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989122nF0CsT-13amKzoWR.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989121V9MO6scyY3kNzuTJ.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989120mxAHvYXDtqw-8dcx.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989119hhpjyFqaCIi0w_oD.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989117QH-UjgrrAGIvlkZG.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/16019891164VX_pgnrjWN19Jda.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989116hL74Klxfgw_cWa1F.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989114cBUDuPKlguEdWysq.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989113flHhyIUSMVM9Yc1f.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989112_jlsoOovFmKbhFHE.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989111gshXsikQtH2l2Cf-.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989110pH6nymHP5ITQQmld.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/16019891089VktxH9I5SvZKuWi.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989106TXpn_k5T_FPc-ksR.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989105o_jX3jreRxe1rTDl.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/160198910483M50AkYkdoUnvrD.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989103cR03tz1upXDHVyKq.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989102n7MeyFBrov4vrEO-.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/160198910122mG1AlBJN0CsVUq.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989100OUfGixttHZ30_49A.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989099IyI7zbqG2n0WYMc6.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989098yIpYKjFiu8jTwq5R.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/16019890953gIQ6Oy9hI_13Y7x.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989094OqRVay6sO63SjfHw.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989093OBWKBWymhKudHXaY.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989092f1kAlFD-uP7ufThR.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989091x3RNgYHlsZgkSemU.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989090pGJv3LsHENuLvm5E.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989089U6McDjOTOPGcv0O1.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989088VkQHsQWFkLlpVsvV.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/160198908799_8fQ1HxWNajold.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989086vaz3rGVUPlMi5bhE.jpg', '/ManHuaKu/J/JianZhiYanWang/42buqieryu/1601989084KQdmF9xVFstG79j0.jpg', '/ManHuaKu/222.jpg'],
    'fc': 49,
    'burl': '/40257/',
    'bs': 0
};



如果用asp.net的话,怎么能做到呢?逛了论坛,有看一个哥们发过一个方法,是用:MSScriptControl
引用com组件 Microsoft Script Control 1.0


[C#] 纯文本查看 复制代码
private string Eval(string stringjs)
{
    string MyJs = "function Eval(code){code2=code.replace(/^eval/,'');return eval(code2);}";
    object[] _params = new object[1];
    _params[0] = stringjs;
    MSScriptControl.ScriptControl js = new MSScriptControl.ScriptControl();
    js.Language = "javascript";
    js.AddCode(MyJs);
    string result = js.Run("Eval", _params);//NET4.0以下为js.Run("Eval",ref _params).ToString();
    return result;
}



但是这个有bug,在x64的系统下,无法运行,然后你换成  x86的话,可以运行,但是到了这一步,就会报各种错误



就是特别多的问题,我想问下,各位大手子们,都还有什么方法呢?


1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
发表于 2020-12-3 15:04:19 | 显示全部楼层
这个可以在线找工工具,人工的话有点不好搞,需要具体分析
发表于 2020-12-10 13:14:49 | 显示全部楼层
加我QQ 228691508
发表于 2020-12-15 14:07:27 | 显示全部楼层
回复

使用道具 举报

 楼主| 发表于 2021-4-21 02:52:42 | 显示全部楼层

加你了
 楼主| 发表于 2022-3-14 03:27:54 | 显示全部楼层
站长苏飞 发表于 2020-12-3 15:04
这个可以在线找工工具,人工的话有点不好搞,需要具体分析

我知道在线工具可以,但是我是在用爬虫弄出来,我写爬虫爬出来了加密后的js代码,然后我想解密他
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

QQ|手机版|小黑屋|手机版|联系我们|关于我们|广告合作|苏飞论坛 ( 豫ICP备18043678号-2)

GMT+8, 2024-11-22 03:09

© 2014-2021

快速回复 返回顶部 返回列表