The unobfuscate Statement
Please note that the unobfuscate statement is obsolete and it will eventually be removed from the ZKM Script language.
The ZKM Script unobfuscate statement unobfuscates all opened classes. Unobfuscation involves
changing the names of packages, classes, fields and methods that have not been excluded by a
exclude statement so that they are Java
legal and meaningful.
However, the unobfuscate statement will not unencrypt String literals encrypted with Zelix KlassMaster nor will it reverse
Zelix KlassMaster's flow obfuscation.
The remainder of this page is organized into the following sections.
Derive subclass names from the superclass name
By default, Zelix KlassMaster unobfuscates class names to Classn or
Interfacen where n is some integer.
If the "deriveSubclassNamesFromSuperclass" parameter is set to true then the unobfuscated
subclass names will reflect the name of their superclasses except where the superclass is java.lang.Object.
For example, if there were two classes with
- one class being a subclass of
java.util.Observable and
- the other being a subclass of the first
then the unobfuscated names would be
Observable_Sub1 and
Observable_Sub1_Sub1 .
Selecting this option makes the unobfuscated class names more meaningful but it can also make then rather
unwieldly when inheritance hierarchies are several levels deep.
Keep inner class information
The JDK 1.1 introduced inner classes. At the level of the bytecode, inner classes are distinguished by the
structure of their names and by the presence of a few attributes. This inner class information is not critical
to the running of your bytecode. It is provided for the use of debuggers and similar utilities.
If you set the "keepInnerClassInfo" parameter to true then Zelix KlassMaster will retain this
inner class information. You can select this option if you are confident that the obfuscated classes
contain valid inner classes information. If there is no inner class information then the options has no
effect.
Defaults
The unobfuscate statement has useful defaults which are as follows:
Omitted parameter
|
Effect
|
changeLogFileOut
|
changeLogFileOut="ChangeLog.txt"
|
keepInnerClassInfo
|
keepInnerClassInfo=false
|
deriveSubclassNamesFromSuperclass
|
deriveSubclassNamesFromSuperclass=true
|
unobfuscate; //Unobfuscate using the defaults
unobfuscate changeLogFileOut="" //Don't write to a change log file
keepInnerClassInfo=true //Retain any inner class information
deriveSubclassNamesFromSuperclass=false; //Use simple class names
"unobfuscate"
|
["changeLogFileIn" "=" "\"" changeLogFileNameIn "\""]
|
|
["changeLogFileOut" "=" "\"" changeLogFileNameOut "\""]
|
|
["keepInnerClassInfo" "=" ("true" | "false")]
|
|
["deriveSubclassNamesFromSuperclass" "=" ("true" | "false")]
|
Where
changeLogFileNameIn is the name of the existing change log file from which the previously used name mapping details are to be read.
changeLogFileNameOut is the name of the file to which the new change details are to be written.
|