Is there a simple description of how the dictionary file in Proguard should be structured?
I've read about -?obfuscationdictionary
, but I couldn't find anything about the files themselves.
Besides, I'd like to change the naming scheme to something more complex, and not just a
, b
etc. and paramX
, paramY
... I'd like a random series of characters, if possible.
And yes, I know it's just a visual difference that can be remodeled (refactored?) to something easier to read. Still, just asking...
Thanks
The dictionary file format is pretty simple:
#
ignoredIf you want to create a dictionary of random strings, you could write a simple program to generate them and dump them to a text file, or use http://www.random.org/strings which has a nice simple web interface for creating random strings. It spits them out one per line, so you could use its output directly as your dictionary file.
Here's some sample output (you can generate strings of any size):
HISPj7KHQ7 Wja3o2vx62 eyd3OXAZgV DxDJysLV5r BsUTWEAMAI R7N8DF4OVS 4q7UsoAgP4 cWbN6pumKk SJowARcXwM OyIbF7L6XB
Here's an example I found:
https://trac.openxdata.org/browser/trunk/j2me/openxdata-mobile/epihandy-lite/proguard/examples/dictionaries/keywords.txt?rev=1156
# # 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
Any text file will work. ProGuard uses all valid identifiers in the file. It ignores lines starting with '#'. The directory examples/dictionaries in the ProGuard distribution contains a few examples (including the example pasted by ulmangt).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With