java Java混淆器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/310533/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 11:54:08  来源:igfitidea点击:

Java obfuscators

javaobfuscation

提问by jbu

I'm looking for a good Java obfuscator.

我正在寻找一个好的 Java 混淆器。

I've done initial research into the following Java obfuscators: proguard, yguard, retroguard, dasho, allatori, jshrink, smokescreen, jobfuscate, marvin, jbco, jode, javaguard, jarg, joga, cafebabe, donquixote, mwobfu, bbmug, zelix klassmaster, sandmark, jcloak, thicket, blufuscator, and java code protector.

我对以下 Java 混淆器进行了初步研究:proguard、yguard、retroguard、dasho、allatori、jshrink、smoscreen、jobfuscate、marvin、jbco、jode、javaguard、jarg、joga、cafebabe、donquixote、mwobfu、bbmug、zelix klassmaster 、sandmark、jcloak、丛林、blfuscator 和 java 代码保护程序。

I tried proguard and it has a really nice GUI, seems really stable, and seems to be the most popular, but it seemed to not like some enumeration on a referenced jar file (not within the code I was trying to obfuscate) which was weird. Yguard seems to require some interaction with ant, which I didn't know too much about.

我尝试了 proguard,它有一个非常好的 GUI,看起来非常稳定,并且似乎是最受欢迎的,但它似乎不喜欢引用的 jar 文件上的一些枚举(不在我试图混淆的代码中),这很奇怪. Yguard 好像需要和 ant 进行一些交互,这个我不太了解。

What is a good java obfuscator? It doesn't need to be free, it just needs to work well and be easy to use.

什么是好的 Java 混淆器?它不需要是免费的,它只需要运行良好且易于使用。

回答by Lawrence Dol

I use ProGuardheavily for all my release builds and I have found it is excellent. I can't recommend it enough!

我在所有发布版本中都大量使用ProGuard,我发现它非常好。我不能推荐它!

I haveencountered obscure bugs caused by it's optimizations on several occasions and I now disable optimizations across the board - haven't had a problem caused by ProGuard since. Though, to be fair, these were all quite some versions ago - YMMV.

曾多次遇到由它的优化引起的模糊错误,现在我全面禁用优化 - 从那以后没有遇到过由 ProGuard 引起的问题。不过,公平地说,这些都是一些以前的版本 - YMMV。

I used to use the GUI onlyto get a config started, and then I resort to editing the text config myself, which is really very simple to do. These days I do the config by hand.

我以前使用 GUI只是为了开始配置,然后我自己编辑文本配置,这真的很简单。这些天我手工进行配置。

I have quite complex projects all of which involve dynamic loading and reflection. I also heavily use reflection for a callback implementation. ProGuard has coped with these very well.

我有相当复杂的项目,所有项目都涉及动态加载和反射。我还大量使用反射来实现回调。ProGuard 很好地处理了这些问题。

EDIT: We also use DashO Pro for one of our products - I looked into it for packaging the products I am responsible for and concluded that it's configuration was too convoluted and complex; also integrating it into the build script seemed like a bit of a pain. But again, to be fair, this was circa 2001... so it might be better in current versions.

编辑:我们也将 DashO Pro 用于我们的一种产品 - 我研究了它来包装我负责的产品并得出结论认为它的配置过于复杂和复杂;还将它集成到构建脚本中似乎有点痛苦。但同样,公平地说,这是大约 2001 年......所以在当前版本中可能会更好。

回答by jbu

A good collection of links to free and commercial tools is given in this arcticle

这篇文章提供了一个很好的免费和商业工具链接集合

"Protect Your Java Code - Through Obfuscators And Beyond"

“保护您的 Java 代码 - 通过混淆器及其他”

The author also discusses the strong and weak points of bytecode obfuscation

作者还讨论了字节码混淆的优缺点

回答by VonC

What is the issue with ProGuard ? (which is recommended both by this questionand this one).

ProGuard 有什么问题?(this questionthis one都推荐)。

There is a section of troubleshootingabout enumerator, but they seem to be taken into account just fine.

有一段关于 enumerator的故障排除,但它们似乎被很好地考虑在内。

However, Obfuscation breaks some attempts at reflection, even though modern obfuscators can detect and to some extend adjust usages of reflection in the code they're obfuscating.

然而,混淆会破坏一些反射尝试,即使现代混淆器可以检测并在一定程度上调整它们混淆的代码中反射的使用。

回答by Huntrods

I used Zelix Klassmaster in a commercial application for several years and found it to be excellent. I threw quite a few resources at the obfuscated code, and was not able to "break" it. It's pricey, but good.

我在商业应用程序中使用 Zelix Klassmaster 好几年了,发现它非常好。我在混淆的代码上投入了相当多的资源,但无法“破解”它。它很贵,但很好。

I only stopped using it when my version got old enough that the upgrade cost was significant. My needs had changed and I didn't really need to obfuscate the classes anymore. However, if the need arises again, I'd pay for it and use it in a flash.

当我的版本足够老以至于升级成本很高时,我才停止使用它。我的需求已经改变,我真的不需要再混淆类了。但是,如果再次需要,我会付费并立即使用它。

Cheers,

干杯,

-Richard

-理查德

回答by FoxyBOA

We are using Zelix Klassmaster for couple years and I can recommend it.

我们使用 Zelix Klassmaster 已有几年了,我可以推荐它。

回答by Ron Warshawsky

I use and suggest Zelix- 100% - very solid and robust protection

我使用并建议Zelix- 100% - 非常坚固和强大的保护