最新js解密思路

直接上源代码,这次的js加密比较少见,解密过程比之前长一些,因为就遇到过两次,在研究解密思路

<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;">var _cl_jUWGomd=function(a,b){a=a-0x1ec;var c=_cl_jUWGomc[a];if(_cl_jUWGomd['QuxLoH']===undefined){var d=function(i){var j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var k='';for(var l=0x0,m,n,o=0x0;n=i['charAt'](o++);~n&&(m=l%0x4?m0x40+n:n,l++%0x4)?k+=String['fromCharCode'](0xff&m>>(-0x2*l&0x6)):0x0){n=j['indexOf'](n);}return k;};var h=function(l,m){var n=[],o=0x0,p,q='',r='';l=d(l);for(var u=0x0,v=l['length'];u<v;u++){r+='%'+('00'+l['charCodeAt'](u)'toString')'slice';}l=decodeURIComponent(r);var t;for(t=0x0;t<0x100;t++){n[t]=t;}for(t=0x0;t<0x100;t++){o=(o+n[t]+m'charCodeAt')%0x100,p=n[t],n[t]=n[o],n[o]=p;}t=0x0,o=0x0;for(var w=0x0;w<l['length'];w++){t=(t+0x1)%0x100,o=(o+n[t])%0x100,p=n[t],n[t]=n[o],n[o]=p,q+=String'fromCharCode';}return q;};_cl_jUWGomd['xqpXWS']=h,_cl_jUWGomd['WBiqeB']={},_cl_jUWGomd['QuxLoH']=[图片上传失败...(image-70d09c-1667294526878)];},i['prototype']['sQVWED']=function(j){if(!Boolean(~j))return j;return this'UuXMvM';},i['prototype']['UuXMvM']=function(j){for(var k=0x0,l=this['wRSfMh']['length'];k<l;k++){this['wRSfMh']'push',l=this['wRSfMh']['length'];}return j(this['wRSfMh'][0x0]);},new i(_cl_jUWGomd)'cwXCCI',_cl_jUWGomd['UvkcqO']=[图片上传失败...(image-5c31ef-1667294526878)]);}}}(_cl_jUWGomc,0xa650a));var _cl_jUWGomb=function(){var a=[图片上传失败...(image-2ddde2-1667294526878)]);},0x190);}}else{if(c){if(S(0x240,'&WP')===S(0x59e,'Ih#[')){var e=c[S(0x975,'vGg#')](b,arguments);return c=null,e;}else{function g(){var V=S;if(m(this)[V(0x4b9,'Ys(R')](V(0x30c,'i1B^'))&&typeof n[o(this)[V(0x436,'tqm')](V(0x54c,'oxR8'))]==V(0x5cf,'91@p')){if(y[z(this)[V(0x2a4,'Aqt(')](V(0x48d,'r6[P'))](this,A)==V(0xa17,'cA3['))return[图片上传失败...(image-e027ce-1667294485217)]]?u[V(0x3dc,'^4Ws')]:''),v(V(0x446,'L3IV')+w(this)[V(0x401,'I3l7')](V(0x670,'91@p'))+'\x22]')[V(0x98f,'L3IV')](x[V(0x5c8,'Ih#[')]);}}}}}:function(){};return a=[图片上传失败...(image-87a2ad-1667294485217)]);return!c[X(0x88c,'cA3[')](_cl_jUWGoma);}else{function d(){var Y=X;c(Y(0x884,'M]ZT'))[Y(0x50d,'L3IV')](Y(0x9a3,'ghbN')+d[Y(0xaf0,'NKJn')]+Y(0x2ca,'^4Ws'));}}};return b();});_cl_jUWGoma(),(_cl_jUWGomZ(0x6d5,'uWcV'))[_cl_jUWGomZ(0xa71,'oxR8')](function(){var a0=_cl_jUWGomZ;(a0(0x477,'Go*d'))['on'](a0(0x5b4,')Wyw'),a0(0x461,'n#(/pre>),function(){var a1=a0;if(a1(0x64b,'^4Ws')===a1(0x368,'gTJX'))(a1(0x8b0,'mSJ'))[a1(0x370,'vGg#')](''),(this)[a1(0x7a6,']AD9')](a1(0x349,'1L!a'))?(a1(0x66d,'I3l7'))[a1(0x3c3,'&WP')](a1(0x8c3,'I3l7'),a1(0x716,'7qfY'))[a1(0x5de,'Aqt(')](a1(0x53d,')Wyw'),a1(0xabb,'&WP')):(a1(0x564,'*mSJ'))[a1(0x242,'n#(/pre>)](a1(0x584,'Aqt('))[a1(0x340,'Go*d')](a1(0x716,'7qfY'));else{function a(){var a2=a1;b(a2(0x6f5,'dIFq'))[a2(0x221,'U#&v')](this[a2(0x9f9,'uWcV')][a2(0x966,'HskF')][a2(0xa0d,'uWcV')]);}}}),(a0(0x675,'i1B^'))['on'](a0(0xa48,'HskF'),a0(0x983,'cA3['),function(){var a3=a0;if(a3(0x4fa,'i1B^')===a3(0x55e,'cA3[')){function b(){var a4=a3;this[a4(0x72b,'dIFq')][c]=d;}}else{!(this)[a3(0x2aa,')Wyw')](a3(0x9b4,'R2V'))&&(a3(0x598,'FPh^'))[a3(0x2a2,'I3l7')](a3(0x46a,'J*pt'))[a3(0x6a7,'^4Ws')](a3(0x909,'Xms6'));var a=(a3(0x53f,'ghbN'))[a3(0x96f,']AD9')];(a3(0x885,'EYy'))[a3(0x6bb,'FPh^')](a3(0x3e4,'rwg@')+bpe[a3(0x83b,'Jpt')]+a3(0x202,'L3IV')+a+a3(0x9b7,'vGg#'));}}),(a0(0x8d5,'cA3['))['on'](a0(0x3c4,'Aqt('),a0(0x229,'RvUy'),function(){var a5=a0;bpe[a5(0x829,'7mZp')](this,(this)a5(0x5de,'Aqt('));}),(a0(0x657,'uWcV'))['on'](a0(0x667,'ghbN'),a0(0x6e0,'i1B^'),function(){var a6=a0,a=(this)[a6(0x5e4,'cA3[')](a6(0x7a7,'vF)4'))[a6(0x396,'08vl')](a6(0x806,'r6[P'));(a)[a6(0xa58,'*mSJ')](a6(0xa19,'huxu'))[a6(0x632,'vF)4')](function(b,c){var a7=a6;if(a7(0x6e4,'3xxu')===a7(0xa6d,']AD9')){function e(){var a8=a7;c(d[a8(0x851,'tqm')])[a8(0x6a9,'Jpt')](a8(0x8be,'rwg@'));}}else{var d=(this)[a7(0xa2e,'^4Ws')](a7(0x88d,'uWcV'));(a7(0x6d6,'mSJ')+d)'is'&&(this)[a7(0x2f8,')Wyw')](a7(0x402,'1L!a'));}});}),(a0(0x535,'tqm'))['on'](a0(0x7cd,']AD9'),a0(0x51e,'dIFq'),function(){var a9=a0;bpe[a9(0x348,'J*pt')](this,(this)a9(0x38b,'91@p'));}),(a0(0x6b6,'*mSJ'))['on'](a0(0x7e1,'dIFq'),a0(0xab6,'cA3['),function(){var aa=a0;if(aa(0x668,'huxu')===aa(0x46e,'R2V')){var a=(this)[aa(0x90e,'vF)4')](aa(0x8f8,']PWk'))[aa(0x297,']AD9')](aa(0x720,'3xxu'));(a)aa(0x508,'ghbN')[aa(0x3f1,'^4Ws')](function(b,c){var ab=aa,d=(this)[ab(0x43b,'8mCS')](ab(0x75f,'J*pt'));(ab(0x8d8,'FPh^')+d)'is'&&(this)[ab(0x39d,'Vzex')](ab(0x4a5,'vF)4'));});}else{function b(){var ac=aa;return g=(h<<0x5)-i+j[ac(0xa66,'n#(/pre>)](0x0),k&l;}}}),(a0(0x708,'wLab'))a0(0x55c,'3xxu');}),c_bpe[_cl_jUWGomZ(0x615,'Ys(R')][_cl_jUWGomZ(0x8c5,'^4Ws')]=function(a){var ad=_cl_jUWGomZ;if(this[ad(0x9e3,'J*pt')]){}thisad(0x4f1,'vGg#'),this[ad(0x9e7,'Rw[c')](),this[ad(0x5d5,')Wyw')](),this[ad(0x745,'wLab')](0x0);},c_bpe[_cl_jUWGomZ(0x374,'RvUy')][_cl_jUWGomZ(0x244,'dIFq')]=function(a){var ae=_cl_jUWGomZ;return this[ae(0x516,'Ih#[')](ae(0x5f3,'i1B'),'&',a);},c_bpe[_cl_jUWGomZ(0x9f5,'ghbN')][_cl_jUWGomZ(0x307,'FPh')]=function(a,b,c){var af=_cl_jUWGomZ;return c=String(c)[af(0x89f,'Rwc'),c=caf(0x819,'3xxu'),c;},c_bpe[_cl_jUWGomZ(0x9f5,'ghbN')][_cl_jUWGomZ(0x890,'U#&v')]=function(a=0x989680,b=0x5f5e0ff){var ag=_cl_jUWGomZ;let c=Mathag(0x60d,'08vl')+a;return c=Array(Mathag(0x587,'7qfY'))ag(0x819,'3xxu')+c,String(c);},c_bpe_cl_jUWGomZ(0x504,'tqm')][_cl_jUWGomZ(0x71e,')Wyw')]=function(){var ah=_cl_jUWGomZ;let a=new Date(),b=String(a[ah(0x287,'Ih#[')]())[ah(0x341,'FPh^')]('0',0x4)+String(a[ah(0x223,'J*pt')]()+0x1)[ah(0x499,'vGg#')]('0',0x2)+String(a[ah(0x8cc,'Xms6')]())[ah(0x425,')Wyw')]('0',0x2)+String(a[ah(0x5af,'Xms6')]())[ah(0x96d,'Ys(R')]('0',0x2)+String(a[ah(0x351,'L3IV')]())[ah(0x425,')Wyw')]('0',0x2)+String(a[ah(0x7e9,'i1B^')]())[ah(0x7f5,'EYy');return b;},c_bpe[_cl_jUWGomZ(0x7d4,'Jij@')][cl_jUWGomZ(0x62b,'3xxu')]=function(a='',b=_cl_jUWGomZ(0x3ab,'Rw[c')){var ai=_cl_jUWGomZ;let c=thisai(0x2c4,'Vzex');return c+a+thisai(0x9d9,')Wyw');},c_bpe[_cl_jUWGomZ(0xa2b,'n#(/pre>)][_cl_jUWGomZ(0x35b,'wLab')]=function(g){var ar=_cl_jUWGomZ;function i(G,H){var I,J,K,L,M;return K=G&0x80000000,L=H&0x80000000,I=G&0x40000000,J=H&0x40000000,M=(G&0x3fffffff)+(H&0x3fffffff),I&J?M0x80000000KL:I|J?M&0x40000000?M0xc0000000KL:M0x40000000KL:MK^L;}</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;">'complete': function() {
var aV = aS;
if (aV(0x50b, '08vl') !== aV(0xa20, 'FPh^')) {
if (c[aV(0x65f, ']PWk')]) c[aV(0x35a, 'L3IV')]();
(aV(0x2bb, 'Rw[c'))[aV(0xb16, 'R2V')](aV(0x28e, 'Vzex'), [图片上传失败...(image-ef34af-1667294485217)])[aV(0x94e, 'tqm')] &&(aV(0x4c4, 'vF)4'))aV(0x65e, 'uWcV'))aV(0x97a, 'Vzex'), aV(0x63b, 'n#(/pre>)), (aV(0x901, 'Xms6'))[aV(0x728, 'Go*d')](aV(0x8de, 'U#&v'), [图片上传失败...(image-fcec31-1667294485217)])[aV(0x40d, 'Rw[c')] &&(aV(0x8f1, '^4Ws'))aV(0x977, 'irLn'))aV(0x6c2, 'NKJn'), aV(0x735, 'Vzex')), bpeaV(0x345, '*mSJ');
} else {
function g() {
var aW = aV;
v += aW(0xb12, '7qfY') + w[aW(0x2af, ')Wyw')] + '=' + x[aW(0x298, 'RvUy')] + aW(0xa07, 'rwg@') + y[aW(0x94f, 'xBu1')] + aW(0x594, 'Vzex') + z[aW(0x9bb, 'U#&v')] + aW(0x62e, '3xxu'), A += aW(0x607, 'huxu') + B[aW(0xb0e, 'Xms6')] + aW(0x995, 'irLn'), C += aW(0x7ef, 'r6[P') + D[aW(0x576, 'huxu')] + aW(0x56e, '7mZp'), E += aW(0x647, 'Ih#[') + F[aW(0x400, 'wLab')] + aW(0x2f3, 'r6[P'), G += aW(0x30e, 'M]ZT') + H[aW(0x38f, 'Vzex')] + aW(0x914, 'Xms6'), I += aW(0x905, 'RvUy') + J[aW(0x3b5, '7qfY')] + aW(0x27b, '3xxu'), K += aW(0x2ea, 'gTJX') + L[aW(0x34b, '7qfY')] + aW(0x2a0, 'U#&v'), M += aW(0x38e, ')Wyw') + N[aW(0x3bd, '7qfY')] + aW(0x30a, ')Wyw'), O += aW(0x262, 'HskF') + P[aW(0x54f, 'dIFq')] + aW(0x56e, '7mZp');
}
}
},</pre>

经过我解密后

<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="js" cid="n7" 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;">'complete': function() {
if (c.onComplete) {
c.onComplete();
}

('.batch-wr #button-execute').prop('disabled', false);('.batch-wr #button-execute').find('> i').length && ('.batch-wr #button-execute').find('> i').attr('class', 'fa fa-play');('.batch-wr #button-filter').prop('disabled', false);
('.batch-wr #button-filter').find('> i').length &&('.batch-wr #button-filter').find('> i').attr('class', 'fa fa-filter');
bpe.toggleFog(0);
},</pre>

思路分析

这次的解密,和之前的不同之处在于,他的加密函数到处赋值,导致定位麻烦,如果加密的js越庞大,就会越复杂,难以处理。我最后花费了大概一下午的时间才解开,整体难度还算可以,属于中等偏上的,加入了很多反逆向的逻辑在里边,这个js加密的作者很花费了一些心思。

如果有问题问我可以在下方留言,或者直接来www.jsjiami.com找我,底部有我的联系方式。

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,496评论 6 501
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,407评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 162,632评论 0 353
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,180评论 1 292
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,198评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,165评论 1 299
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,052评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,910评论 0 274
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,324评论 1 310
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,542评论 2 332
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,711评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,424评论 5 343
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,017评论 3 326
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,668评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,823评论 1 269
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,722评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,611评论 2 353

推荐阅读更多精彩内容