Proguard 中的字典文件应该如何构建,是否有简单的描述?
我读过有关 -?obfuscationdictionary
的内容,但我找不到有关文件本身的任何信息。
此外,我想将命名方案更改为更复杂的东西,而不仅仅是 a
、b
等和 paramX
, paramY
...如果可能的话,我想要一系列随机字符。
是的,我知道这只是视觉上的差异,可以将其 reshape (重构?)为更易于阅读的内容。仍然,只是问...
谢谢
最佳答案
字典文件格式非常简单:
- 每行一个词
- 忽略空行
- 忽略以
#
开头的行
如果你想创建一个随机字符串的字典,你可以编写一个简单的程序来生成它们并将它们转储到一个文本文件中,或者使用 http://www.random.org/strings它有一个很好的简单的网络界面来创建随机字符串。它每行吐出一个,因此您可以直接将其输出用作字典文件。
这是一些示例输出(您可以生成任意大小的字符串):
HISPj7KHQ7 Wja3o2vx62 eyd3OXAZgV DxDJysLV5r BsUTWEAMAI R7N8DF4OVS 4q7UsoAgP4 cWbN6pumKk SJowARcXwM OyIbF7L6XB
这是我找到的一个例子:
# # This obfuscation dictionary contains reserved Java keywords. They can't # be used in Java source files, but they can be used in compiled class files. # Note that this hardly improves the obfuscation. Decent decompilers can # automatically replace reserved keywords, and the effect can fairly simply be # undone by obfuscating again with simpler names. # Usage: # java -jar proguard.jar ..... -obfuscationdictionary keywords.txt # do if for int new try byte case char else goto long this void break catch class const final float short super throw while double import native public return static switch throws boolean default extends finally package private abstract continue strictfp volatile interface protected transient implements instanceof synchronized
关于java - 类、成员和参数混淆的 Proguard 自定义命名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10044993/