Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Design Pattern & UML  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 谁给介绍一款好的混淆器,最好要能在ant中使用的,谢谢
worldcreatxr





发贴: 149
积分: 0
于 2004-07-06 10:09 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
谁给介绍一款好的混淆器,最好要能在ant中使用的,谢谢
我在sourceforge上找着了一款
  <target name="obfuscate" depends="jar">
    <taskdef name="proguard" classname="proguard.ant.ProGuardTask" classpath="${required.lib}/proguard.jar" description="sourceforge.net" />
    <!--obfuscate configuration="obfuscateConfigFile.pro" /-->
    <proguard printseeds="on">
      <libraryjar refid="required.lib.set" />
      <libraryjar name="${java.home}/lib/rt.jar" />
      <keep type="interface" />
      <injar>
        <fileset dir="${build.lib}">
          <include name="*.jar" />
        </fileset>
      </injar>
      <outjar name="${reports.tests}" />
    </proguard>
  </target>
=============================================

可是在nmi的反编译下无所遁形
以下是混淆后的反编译结果
// NMI's Java Code Viewer 6.0a
// www.trinnion.com/javacodeviewer

// Registered to root - Enterprise License
// Generated PGFZ6~ F_TB 06 2004 10:02:26

ckage creatxr.demos.simple.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import org.apache.log4j.Logger;

public class HelloWorld extends HttpServlet {

private static final Logger a;

public HelloWorld() {
}

protected void doGet(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) throws ServletException, IOException {
doPost(httpservletrequest, httpservletresponse);
}

protected void doPost(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) throws ServletException, IOException {
httpservletresponse.setContentType("text/html; charset=UTF-8");
HttpSession httpsession = httpservletrequest.getSession();
String s = httpservletrequest.getParameter("username");
String s1 = httpservletrequest.getParameter("userpass");
PrintWriter printwriter = httpservletresponse.getWriter();
printwriter.println("<html><head><title> Servlet Example </title></head><body>");
if(s.equals(s1)) {
printwriter.println("Hello World Servlet");
httpsession.setAttribute("username", s);
httpsession.setAttribute("userpass", s1);
} else {
a.info(httpservletrequest.getRemoteAddr() + " " + s);
printwriter.println("username <> userpass");
}
printwriter.println("</body></html>");
}

static Class a(String s) {
return Class.forNameMoon;
ClassNotFoundException classnotfoundexception;
classnotfoundexception;
throw new NoClassDefFoundError(classnotfoundexception.getMessage());
}

static {
a = Logger.getLogger(creatxr.demos.simple.servlet.HelloWorld.class);
}
}
============================================

以下是没混淆的反编译结果
// NMI's Java Code Viewer 6.0a
// www.trinnion.com/javacodeviewer

// Registered to root - Enterprise License
// Generated PGFZ6~ F_TB 06 2004 10:13:23

ckage creatxr.demos.simple.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import org.apache.log4j.Logger;

public class HelloWorld extends HttpServlet {

private static final Logger log;

public HelloWorld() {
}

protected void doGet(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) throws ServletException, IOException {
doPost(httpservletrequest, httpservletresponse);
}

protected void doPost(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) throws ServletException, IOException {
httpservletresponse.setContentType("text/html; charset=UTF-8");
HttpSession httpsession = httpservletrequest.getSession();
String s = httpservletrequest.getParameter("username");
String s1 = httpservletrequest.getParameter("userpass");
PrintWriter printwriter = httpservletresponse.getWriter();
printwriter.println("<html><head><title> Servlet Example </title></head><body>");
if(s.equals(s1)) {
printwriter.println("Hello World Servlet");
httpsession.setAttribute("username", s);
httpsession.setAttribute("userpass", s1);
} else {
log.info(httpservletrequest.getRemoteAddr() + " " + s);
printwriter.println("username <> userpass");
}
printwriter.println("</body></html>");
}

static Class _mthclass$(String s) {
return Class.forNameMoon;
ClassNotFoundException classnotfoundexception;
classnotfoundexception;
throw new NoClassDefFoundError(classnotfoundexception.getMessage());
}

static {
log = Logger.getLogger(creatxr.demos.simple.servlet.HelloWorld.class);
}
}



我是世界的缔造者!
作者 Re:谁给介绍一款好的混淆器,最好要能在ant中使用的,谢谢 [Re:worldcreatxr]
enhydra





发贴: 62
积分: 0
于 2004-07-06 13:51 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我用过ZKM,还不错.
但是现在是收费的,虽然价格不太高, 公司买肯定没有问题.

Free的 Obfuscator, 效果都不太好.




flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2018 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号
客服电话 0592-8750026    客服信箱 714923@qq.com    客服QQ 714923