zoukankan      html  css  js  c++  java
  • js混淆代码还原-js反混淆:利用js进行赋值实现

    先贴一个混淆后的测试代码:

    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,'忧郁的匹格|alert|function|b|a|反混淆测试2|反混淆测试1|反混淆测试3|var'.split('|'),0,{}))

    反混淆方法

    1. 新建一个网页xxx.html
    2. 加入一个div容器id="divTest"
    3. 赋值执行:(在上面混淆的代码中,将eval()中的内容提取出来赋值(或直接打印)给document.getElementById('divTest').innerText )
    document.getElementById('divTest').innerText=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,'忧郁的匹格|alert|function|b|a|反混淆测试2|反混淆测试1|反混淆测试3|var'.split('|'),0,{})
    1. 打开xxx.html 显示结果:(反混淆后的代码已经被压缩了,去掉了换行等字符)
    alert("忧郁的匹格-反混淆测试1");function a(){alert("忧郁的匹格-反混淆测试2")}var b=function(){alert("忧郁的匹格-反混淆测试3")};a();b()
  • 相关阅读:
    Java数据库——CallableStatement接口
    Java数据库——处理大数据对象
    Java数据库——PreparedStatement接口
    Java数据库——ResultSet接口
    Java数据库——连接关闭、增删改查
    Ubuntu下的MySQL安装
    JDBC
    注释(Annotation)
    类的生命周期
    Java反射机制<2>
  • 原文地址:https://www.cnblogs.com/Bonker/p/5517051.html
Copyright © 2011-2022 走看看