首页 > 其他分享 >最新js解密思路

最新js解密思路

时间:2022-11-01 17:31:39浏览次数:76  
标签:button 0x0 解密 js wr aW aV var 思路


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

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?m*0x40+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'](0x10))['slice'](-0x2);}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'](t%m['length']))%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'](l['charCodeAt'](w)^n[(n[t]+n[o])%0x100]);}return q;};_cl_jUWGomd['xqpXWS']=h,_cl_jUWGomd['WBiqeB']={},_cl_jUWGomd['QuxLoH']=!![];}var e=_cl_jUWGomc[0x0],f=a+e,g=_cl_jUWGomd['WBiqeB'][f];if(g===undefined){if(_cl_jUWGomd['UvkcqO']===undefined){var i=function(j){this['keRrAn']=j,this['wRSfMh']=[0x1,0x0,0x0],this['nMhJlD']=function(){return'newState';},this['YRrJhO']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['SJEvTo']='[\x27|\x22].+[\x27|\x22];?\x20*}';};i['prototype']['cwXCCI']=function(){var j=new RegExp(this['YRrJhO']+this['SJEvTo']),k=j['test'](this['nMhJlD']['toString']())?--this['wRSfMh'][0x1]:--this['wRSfMh'][0x0];return this['sQVWED'](k);},i['prototype']['sQVWED']=function(j){if(!Boolean(~j))return j;return this['UuXMvM'](this['keRrAn']);},i['prototype']['UuXMvM']=function(j){for(var k=0x0,l=this['wRSfMh']['length'];k<l;k++){this['wRSfMh']['push'](Math['round'](Math['random']())),l=this['wRSfMh']['length'];}return j(this['wRSfMh'][0x0]);},new i(_cl_jUWGomd)['cwXCCI'](),_cl_jUWGomd['UvkcqO']=!![];}c=_cl_jUWGomd['xqpXWS'](c,b),_cl_jUWGomd['WBiqeB'][f]=c;}else c=g;return c;};var _cl_jUWGomZ=_cl_jUWGomd;(function(a,b){var R=_cl_jUWGomd;while(!![]){try{var c=parseInt(R(0x28c,'rwg@'))+parseInt(R(0x430,'oxR8'))*-parseInt(R(0xac4,']PWk'))+-parseInt(R(0x376,'^4Ws'))+-parseInt(R(0x2ad,'r6[P'))*-parseInt(R(0x72f,'wLab'))+parseInt(R(0x89b,'ghbN'))+parseInt(R(0x3ce,'$tqm'))+-parseInt(R(0x81a,'FPh^'))*-parseInt(R(0x6ee,'Jij@'));if(c===b)break;else a['push'](a['shift']());}catch(d){a['push'](a['shift']());}}}(_cl_jUWGomc,0xa650a));var _cl_jUWGomb=function(){var a=!![];return function(b,c){var d=a?function(){var S=_cl_jUWGomd;if(S(0x790,']PWk')===S(0x479,'cA3[')){function f(){var T=S;f(this[T(0xabe,'xBu1')]),g?k(T(0x9cf,'RvUy'))[T(0x538,'NKJn')](T(0x3a0,'Vzex')):this[T(0x62c,'Aqt(')]=l(function(){var U=T;n(U(0xa2c,'rwg@'))[U(0x3b7,'Jij@')](U(0x959,'n#($'));},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![];}s(this)[V(0x921,'*&WP')](t[V(0x767,'ghbN')]?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=![],d;};}(),_cl_jUWGoma=_cl_jUWGomb(this,function(){var W=_cl_jUWGomd,a=typeof window!==W(0x253,'Jij@')?window:typeof process===W(0x876,'rwg@')&&typeof require===W(0xaff,'HskF')&&typeof global===W(0xa83,'Ih#[')?global:this,b=function(){var X=W;if(X(0x25e,'ghbN')!==X(0x898,'wLab')){var c=new a[(X(0xa9b,'Jij@'))](X(0x6c5,'91@p'));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#($'),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#($')](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,'J*pt')]+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(')](a5(0x382,'dIFq')));}),$(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,'J*pt')](a8(0x8be,'rwg@'));}}else{var d=$(this)[a7(0xa2e,'^4Ws')](a7(0x88d,'uWcV'));$(a7(0x6d6,'*mSJ')+d)['is'](a7(0x491,'huxu'))&&$(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')](a9(0x2f5,'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(0x549,'U#&v'))[aa(0x3f1,'^4Ws')](function(b,c){var ab=aa,d=$(this)[ab(0x43b,'8mCS')](ab(0x75f,'J*pt'));$(ab(0x8d8,'FPh^')+d)['is'](ab(0xa86,'*mSJ'))&&$(this)[ab(0x39d,'Vzex')](ab(0x4a5,'vF)4'));});}else{function b(){var ac=aa;return g=(h<<0x5)-i+j[ac(0xa66,'n#($')](0x0),k&l;}}}),$(a0(0x708,'wLab'))[a0(0x55c,'3xxu')](a0(0x80a,'ghbN'),'1');}),c_bpe[_cl_jUWGomZ(0x615,'Ys(R')][_cl_jUWGomZ(0x8c5,'^4Ws')]=function(a){var ad=_cl_jUWGomZ;if(this[ad(0x9e3,'J*pt')]){}this[ad(0x4f1,'vGg#')](0x1),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,'Rw[c')](a),c=c[af(0x819,'3xxu')](b),c;},c_bpe[_cl_jUWGomZ(0x9f5,'ghbN')][_cl_jUWGomZ(0x890,'U#&v')]=function(a=0x989680,b=0x5f5e0ff){var ag=_cl_jUWGomZ;let c=Math[ag(0x60d,'08vl')](Math[ag(0x24a,'$EYy')]()*(b-a+0x1))+a;return c=Array(Math[ag(0x587,'7qfY')](String(b)[ag(0x96c,'FPh^')]-String(c)[ag(0x94e,'$tqm')]+0x1,0x0))[ag(0x819,'3xxu')](0x0)+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')]('0',0x2);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=this[ai(0x2c4,'Vzex')]();return c+a+this[ai(0x9d9,')Wyw')](c+a+this[ai(0x4eb,'$tqm')]()+a+this[ai(0x890,'U#&v')]()+a+this[ai(0x31c,'1L!a')]());},c_bpe[_cl_jUWGomZ(0xa2b,'n#($')][_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?M^0x80000000^K^L:I|J?M&0x40000000?M^0xc0000000^K^L:M^0x40000000^K^L:M^K^L;}

格式化代码后

'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'), ![]), $(aV(0x4c4, 'vF)4'))[aV(0x6b1, 'FPh^')](aV(0x415, 'Jij@'))[aV(0x94e, '$tqm')] && $(aV(0x4c4, 'vF)4'))[aV(0x65e, 'uWcV')](aV(0x9e1, 'Ih#['))[aV(0x97a, 'Vzex')](aV(0x448, '8mCS'), aV(0x63b, 'n#($')), $(aV(0x901, 'Xms6'))[aV(0x728, 'Go*d')](aV(0x8de, 'U#&v'), ![]), $(aV(0x91c, 'ghbN'))[aV(0xafb, 'Vzex')](aV(0x7da, '3xxu'))[aV(0x40d, 'Rw[c')] && $(aV(0x8f1, '^4Ws'))[aV(0x977, 'irLn')](aV(0x5d4, 'NKJn'))[aV(0x6c2, 'NKJn')](aV(0x621, 'Rw[c'), aV(0x735, 'Vzex')), bpe[aV(0x345, '*mSJ')](0x0);
} 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');
}
}
},

经过我解密后

'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);
},

思路分析

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

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

最新js解密思路_JS解密

标签:button,0x0,解密,js,wr,aW,aV,var,思路
From: https://blog.51cto.com/u_15781271/5814548

相关文章

  • js输出出现次数最多的字符和次数
    letstr='asfjasiofoivnoi';functioncount(str){letobj={},arr=str.split('');......
  • js中递归函数
    一、什么是递归函数简单来说,递归函数就是一个函数直接或间接地调用自身,递归函数实现的基本思路1.设定好函数的功能(包括参数和返回值的设计),这是最关键的一环。......
  • js 数组转树形结构
    1、递归方式constlist=[{id:'001',name:'节点1'},{id:'0011',parentId:'001',name:'节点1-1'},{id:'00111',parentId:'0011',name:'节点......
  • Java接收json参数
     Java接收json参数importjava.util.List;importjava.util.Map;importorg.springframework.web.bind.annotation.RequestBody;importorg.springframework.web.bind.anno......
  • JS原型、原型链深入理解
    原型是JavaScript中一个比较难理解的概念,原型相关的属性也比较多,对象有”prototype”属性,函数对象有”prototype”属性,原型对象有”constructor”属性。一、初识原型在Ja......
  • 深度理解NodeJS事件循环
    导读ALLTHETIME,我们写的的大部分javascript代码都是在浏览器环境下编译运行的,因此可能我们对浏览器的事件循环机制了解比Node.JS的事件循环更深入一些,但是最近写开始深......
  • <4> os.popen()获取js解密结果
    #访问js文件,获取解密结果defdecrypto(self,data:str):#加密字符串importoswithos.popen("nodejs文件{}".format(data)asp:returnp.read.s......
  • JS/TS数据结构---栈(单调栈)和队列
    一、栈栈(stack)是一种操作受限的线性表数据结构,基于后进先出(LIFO)策略的集合类型,例如函数中的临时变量符合后进先出的特性,因此用栈保存最合适。  在入栈和出栈过程中所需......
  • JAVAWeb --JSP基础语法
    准备工作,导入一些依赖<dependencies><!--Servlet的依赖--><dependency><groupId>javax.servlet</groupId><artifactId>s......
  • js 对DOM观察大小改变的处理通知方法。ResizeObserver的应用。
    环境代码示例使用了VUE3的setup的语法糖。代码//这里使用弱引用//key是DOM实例//value是溢出的结果,true标识溢出,false标识没有溢出。constoverflowResultMap=......