jsjiami.com.v7加密混淆文件隐藏关键代码的方法

jsjiami.com.v7加密混淆文件隐藏关键代码的方法

首页冒险解谜隐藏的代码更新时间:2024-06-05

前端脚本运行快,但是作为一门解释性语言,如果不做混淆,代码往往对所有人透明,尤其是在一些需要前后端对称加解密的场景,解密方法对所有人可见,那么加密的效果将大大降低,爬虫开发者将很容易破解加密的数据。因此,目前很多前端网站都对一些前端的关键代码进行加密混淆。jsjiami.com提供的算法,效果很好,比较难被反混淆。
示例:

(function(w, d) { aesKey="我是秘钥" // 解密方法,通过秘钥将外部数据进行解密 descrpt(aesKey,data) })(window, document);

加密混淆:

/* * 加密工具已经升级了一个版本,目前为 jsjiami.com.v7 ,更新了加密算法,缩减了体积; * 另外 jsjiami.com.v7 已经强制加入校验,注释可以去掉,但是 jsjiami.com.v7 不能去掉,其他都没有任何绑定。 * 誓死不会加入任何后门,JsJiami.com 加密的使命就是为了保护你们的Javascript 。 */ var version_='jsjiami.com.v7';var _0x11bded=_0x3ddd;(function(_0x1c4e28,_0x781d5,_0xd56fb8,_0x161158,_0x15d56f,_0x361b9d,_0xc5ec37){return _0x1c4e28=_0x1c4e28>>0x3,_0x361b9d='hs',_0xc5ec37='hs',function(_0x1ad84b,_0x28d345,_0x1fe7d6,_0x43e234,_0x12894f){var _0x12ea2b=_0x3ddd;_0x43e234='tfi',_0x361b9d=_0x43e234 _0x361b9d,_0x12894f='up',_0xc5ec37 =_0x12894f,_0x361b9d=_0x1fe7d6(_0x361b9d),_0xc5ec37=_0x1fe7d6(_0xc5ec37),_0x1fe7d6=0x0;var _0x135baf=_0x1ad84b();while(!![]&&--_0x161158 _0x28d345){try{_0x43e234=parseInt(_0x12ea2b(0xa9,'tQfL'))/0x1*(parseInt(_0x12ea2b(0xb0,'jCSx'))/0x2) -parseInt(_0x12ea2b(0xbb,'J3vm'))/0x3 -parseInt(_0x12ea2b(0xbd,'F%Ex'))/0x4*(-parseInt(_0x12ea2b(0xb9,'Zemv'))/0x5) -parseInt(_0x12ea2b(0xab,'Q(&X'))/0x6 -parseInt(_0x12ea2b(0xb4,'mR)z'))/0x7*(parseInt(_0x12ea2b(0xba,'JR@^'))/0x8) parseInt(_0x12ea2b(0xb2,'J3vm'))/0x9 parseInt(_0x12ea2b(0xb6,'m[sq'))/0xa*(parseInt(_0x12ea2b(0xbc,'JR@^'))/0xb);}catch(_0x4b0682){_0x43e234=_0x1fe7d6;}finally{_0x12894f=_0x135baf[_0x361b9d]();if(_0x1c4e28<=_0x161158)_0x1fe7d6?_0x15d56f?_0x43e234=_0x12894f:_0x15d56f=_0x12894f:_0x1fe7d6=_0x12894f;else{if(_0x1fe7d6==_0x15d56f['replace'](/[uLdtHgCEKhOSANRrUJy=]/g,'')){if(_0x43e234===_0x28d345){_0x135baf['un' _0x361b9d](_0x12894f);break;}_0x135baf[_0xc5ec37](_0x12894f);}}}}}(_0xd56fb8,_0x781d5,function(_0x417a5e,_0x3a49d3,_0xe90451,_0x2a3aa0,_0x1ebcc8,_0x14092f,_0x1fbc9b){return _0x3a49d3='\x73\x70\x6c\x69\x74',_0x417a5e=arguments[0x0],_0x417a5e=_0x417a5e[_0x3a49d3](''),_0xe90451='\x72\x65\x76\x65\x72\x73\x65',_0x417a5e=_0x417a5e[_0xe90451]('\x76'),_0x2a3aa0='\x6a\x6f\x69\x6e',(0x1469b4,_0x417a5e[_0x2a3aa0](''));});}(0x650,0x6e25b,_0x5f44,0xcc),_0x5f44)&&(version_=_0x11bded(0xb1,')QRW'));function _0x3ddd(_0x5a5199,_0x44a59c){var _0x5f44ae=_0x5f44();return _0x3ddd=function(_0x3ddd00,_0x3cbdc6){_0x3ddd00=_0x3ddd00-0xa8;var _0x3192e0=_0x5f44ae[_0x3ddd00];if(_0x3ddd['qyEVRF']===undefined){var _0x3a752a=function(_0x59647e){var _0x117b1c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 /=';var _0x2fa79b='',_0x488673='';for(var _0x1c24d1=0x0,_0x19b80c,_0x585f87,_0x58bfde=0x0;_0x585f87=_0x59647e['charAt'](_0x58bfde );~_0x585f87&&(_0x19b80c=_0x1c24d1%0x4?_0x19b80c*0x40 _0x585f87:_0x585f87,_0x1c24d1 %0x4)?_0x2fa79b =String['fromCharCode'](0xff&_0x19b80c>>(-0x2*_0x1c24d1&0x6)):0x0){_0x585f87=_0x117b1c['indexOf'](_0x585f87);}for(var _0x33261a=0x0,_0x634d5f=_0x2fa79b['length'];_0x33261a<_0x634d5f;_0x33261a ){_0x488673 ='%' ('00' _0x2fa79b['charCodeAt'](_0x33261a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x488673);};var _0x380df9=function(_0x250003,_0xb545b){var _0x30081a=[],_0x20fcc3=0x0,_0x3f2df5,_0x49effd='';_0x250003=_0x3a752a(_0x250003);var _0x3c17cd;for(_0x3c17cd=0x0;_0x3c17cd<0x100;_0x3c17cd ){_0x30081a[_0x3c17cd]=_0x3c17cd;}for(_0x3c17cd=0x0;_0x3c17cd<0x100;_0x3c17cd ){_0x20fcc3=(_0x20fcc3 _0x30081a[_0x3c17cd] _0xb545b['charCodeAt'](_0x3c17cd%_0xb545b['length']))%0x100,_0x3f2df5=_0x30081a[_0x3c17cd],_0x30081a[_0x3c17cd]=_0x30081a[_0x20fcc3],_0x30081a[_0x20fcc3]=_0x3f2df5;}_0x3c17cd=0x0,_0x20fcc3=0x0;for(var _0x532a8f=0x0;_0x532a8f<_0x250003['length'];_0x532a8f ){_0x3c17cd=(_0x3c17cd 0x1)%0x100,_0x20fcc3=(_0x20fcc3 _0x30081a[_0x3c17cd])%0x100,_0x3f2df5=_0x30081a[_0x3c17cd],_0x30081a[_0x3c17cd]=_0x30081a[_0x20fcc3],_0x30081a[_0x20fcc3]=_0x3f2df5,_0x49effd =String['fromCharCode'](_0x250003['charCodeAt'](_0x532a8f)^_0x30081a[(_0x30081a[_0x3c17cd] _0x30081a[_0x20fcc3])%0x100]);}return _0x49effd;};_0x3ddd['cyUcDD']=_0x380df9,_0x5a5199=arguments,_0x3ddd['qyEVRF']=!![];}var _0x289178=_0x5f44ae[0x0],_0x2fbd66=_0x3ddd00 _0x289178,_0x719911=_0x5a5199[_0x2fbd66];return!_0x719911?(_0x3ddd['ztZkdz']===undefined&&(_0x3ddd['ztZkdz']=!![]),_0x3192e0=_0x3ddd['cyUcDD'](_0x3192e0,_0x3cbdc6),_0x5a5199[_0x2fbd66]=_0x3192e0):_0x3192e0=_0x719911,_0x3192e0;},_0x3ddd(_0x5a5199,_0x44a59c);}function _0x5f44(){var _0x320f23=(function(){return[version_,'ShEjdsjAiAdaOmrhig.NchoJdmR.vHt7uKNyUdCL==','CJhdT21pdSoOxmonWO3dISkFnW','WRNdRa8xlSk9uCk1yfS','hSkbWPtdN1faWRr7e8o2W6i','WRGOWRjcWQq','WPvcbCokdxru','CSkCrXmbzqS/fq','sSkHw8kQBSkpFwjLl8ogeG'].concat((function(){return['WR14WQqEW6FdKhqsre0Ghmkk','WRRdRG8vBCkTEmkbquHv','W7tdMSoYWRW1pCohC10','fmoRb8o3pSouvsH2lmo/wIuS','cCouW5BcJ0VdHfjrWRFdRCk7WP8','W44rf8ooe8k/wgVdSSopwGhcPXS','CtpdVM9kdmoKq8olWPxdLCkLlW','WQjzWRhdR2hcVK9vEmo9tga','ldqUWOapWQW8WOrUpCko'].concat((function(){return['WP8hB1pdPYpdPSk6fmo2WQ8','W4zDW7mqW5GqW6yKWOZcVmkf','W6m2lmooha','W7BdNCo9W6rvzSkzFfZcMM1zaa','fCoLW4HnBSoud8kzfq','WRVdRW1lcSkHu8kWrW'];}()));}()));}());_0x5f44=function(){return _0x320f23;};return _0x5f44();};(function(_0x3108fd,_0x197804){var _0xcd7f=_0x11bded,_0x2814ae={'GTQin':'我是秘钥','LCuaL':function(_0x34eb0d,_0x15f6c3,_0x2e207a){return _0x34eb0d(_0x15f6c3,_0x2e207a);}};aesKey=_0x2814ae[_0xcd7f(0xb7,')QRW')],_0x2814ae[_0xcd7f(0xa8,'m[sq')](descrpt,aesKey,data);}(window,document));var version_ = 'jsjiami.com.v7';

示例中将密钥和解密方法进行加密混淆隐藏,同时不影响系统功能,适合打包通过服务端返回加密数据,在前端解密显示的场景,可以有效屏蔽大部分爬虫,从而提升网站性能,降低爬虫对网站的影响。

查看全文
大家还看了
也许喜欢
更多游戏

Copyright © 2024 妖气游戏网 www.17u1u.com All Rights Reserved