用Proguard混淆WAR文件 [英] Obfuscating WAR file with Proguard

查看:1256
本文介绍了用Proguard混淆WAR文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想混淆构建为WAR归档的Web应用程序,因为这个敏感的应用程序首次部署在我们的数据中心之外。我尝试使用Proguard GUI工具来混淆输入战争,其中包含UI应用程序所需的所有服务jar,以及其他外部依赖项。尽管Proguard成功运行了一些警告,例如,库类[javax.servlet.UnavailableException]的重复定义,但输出war不包含类,但是包含库jars和web.xml文件的lib。我搞乱的任何步骤?关于此的任何正确文件?如果有人能提供正确的文档或步骤来成功地使用依赖项目(.jar文件)和其他外部jar文件(不需要混淆)来混淆WAR文件,我将不胜感激。

I want to obfuscate my web application built as WAR archive, as this sensitive application in first time deployed outside our data center. I tried to use the Proguard GUI tool to obfuscate the input war, with all the service jar required for the UI application, with other external dependencies. Though the Proguard runs successfully with some warnings, ex., duplicate definition of library class [javax.servlet.UnavailableException], the output war contains no classes, but has lib with the library jars and web.xml files. Any steps I mess? Any right document on this? I would appreciate if anyone can provide the right document or steps to successfully obfuscate a WAR file with dependent project (a .jar file) and other external jar files (that needs no obfuscation).

推荐答案

你不会混淆战争,而是你使用的罐子。你可以在这里做的是设置你的项目,以便构成战争的项目 - 配置xml,WEB-INF内容,资源和web内容以及servlet定义,并将你的java放在库项目中。模糊图书馆项目并在你的网络项目中使用那些混淆的jar。

you wouldn't obfuscate a war but rather the jars your using. What you can do here is setup your project so the project that makes up the war - configuration xml, WEB-INF content, resources and the web content and servlet definitions and put your java in a library project. Obfuscate the library project and use those obfuscated jars in your web project.

这就是我的工作,希望它有所帮助。

That's what I do, hope it helps.

这篇关于用Proguard混淆WAR文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆