如何使用proguard对war文件进行模糊处理 [英] how to obfuscate the war file using proguard

查看:140
本文介绍了如何使用proguard对war文件进行模糊处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用proguard来混淆war文件,我该怎么办?

请解释一下步骤

I want to obfuscate a war file using proguard,how can i do so ?
Please explain me the steps

推荐答案

我对这个问题感到困惑。

I'm puzzled by this question.

与其他Java混淆器一样,Proguard通过重命名每个变量来模糊编译的字节码(.class文件),方法它认为安全重命名。我想你知道这一点,并知道如何使用Proguard用于类文件,因为你特别询问了它。如果没有,请阅读proguard手册。

As other Java obfuscators, Proguard obfuscates the compiled bytecode (.class files) by renaming every variable, method etc. it considers safe to rename. I suppose you know this and know how to use Proguard for class files since you specifically asked about it. If not, read the proguard manual.

对于war文件,您可以通过解压缩从war(或jar)中提取类文件。 (是的,战争是普通的zip文件)。然后你可以通过Proguard运行它们并再次压缩它。您可以使用Winzip,解压缩或任何您喜欢的zip程序。您甚至可以使用JDK压缩和解压缩战争(jar -xvf tobe_extracted.war)。

As for war files, you can extract the class files from war (or jar) by unzipping it. (yes, a war is a normal zip file). Then you can run them through Proguard and zip it up again. You can use Winzip, unzip or whatever zip program you prefer. You can even zip and unzip the war with JDK (jar -xvf tobe_extracted.war).

这种混淆不会影响战争中的其他文件,如属性文件,xml文件等。战争没有加密。在此之后,您的软件可能无法运行,因为基于反射的内容可能会中断Proguard无法知道你的框架是否会用他们强大的反射魔法访问某些内容,并且实际上可以安全地重命名它。

This obfuscation does not affect the other files inside the war, like properties files, xml files and such. The war is not encrypted. Your software may not work after this because reflection based stuff may be break. Proguard can't know whether your frameworks are going to access something with their mighty reflection magic and if it's actually safe to rename it.

这篇关于如何使用proguard对war文件进行模糊处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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