js 混淆代码还原

借助 Chrome 开发者工具

切换到 Console

将混淆的代码中 eval() 中的内容提取 放到任意变量后

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;}('1("0-6");2 4(){1("0-5")}8 3=2(){1("0-7")};4();3()',9,9,'fbzl|alert|function|b|a|test2|test1|test3|var'.split('|'),0,{}))

如 test 变量后:

test = 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;}('1("0-6");2 4(){1("0-5")}8 3=2(){1("0-7")};4();3()',9,9,'fbzl|alert|function|b|a|test2|test1|test3|var'.split('|'),0,{})
除非注明, 风波竹林 文章均为原创,转载请以链接形式标明本文地址
本文地址: https://blog.fbzl.org/js混淆代码还原/

发表评论