|
OverviewThis program is used to obfuscate Java programs. Specifically, change the names of classes, methods and fields to make them 'unintelligible'. For instance, renaming, the method checkPassword() to a. Both the classes, methods and fields are renamed in the .class files they are defined in, and all references are renamed as well. This is a standard way that Java developers attempt to keep their source 'secret'. Because java .class files are easy to disassemble to figure out what they are doing, and are not all that hard to decompile to generate compilable java from them. Which is still the case for obfuscated .class files, only the results still tend to be unreadable, as all the methods get renamed to a, b, c, etc, so there's a good chance noone would be able to make sense of your program. Rediculous really, since determined hackers will figure it out, but, what they hey, better than nothing. So if I sound kind of down on obfuscation, why did I write an obfuscator? I needed to for a client. And they needed to have JNI method names obfuscated, which none of the existing obfuscators actually do (near as I can tell). InvocationThis program is written in Java. Tested on Mac OSX 10.2.6, JRE 1.4.x. Currently requires a JRE or JDK >= 1.3.x, although it may well run on 1.2.x as well (I'll check this out some time). I'll probably also make sure it can run on IBM's J9 VM, since I work on that particular product :-). Anyhoo, I'll leave you to your own devices to get a JRE from somewhere. Invoke the program as follows: There are no 'parameters', only 'options'. Options start with the - (hyphen), followed by the option name, optionally followed by whitespace and an option value.> There is one option which doesn't fit this pattern: the @ (at) option. The @ character is immediately followed by a file name which contains additional options. The @ option may be used inside of @ files. Options in @ files follow the usual pattern, but empty lines, and lines starting with # (comments) are ignored. Options are processed left-to-right, and @ files are considered to be expanded in line. Options-inJar [fileName] This option indicates the name of a jar/zip file which will be processed by the program. All of the classes in the archive are candidates for obfuscation, and all classes and resources will all be placed in the output location. This option may be used more than once. -inDir [directoryName] This option indicates the name of a directory which will be processed by the program. All of the classes in the directory are candidates for obfuscation, and all classes and resources will all be placed in the output location. This option may be used more than once. -outJar [fileName] This option indicates the name of a jar/zip file which will be used to store the resulting classes and resources. Only one of -outJar or -outDir can be used. -outDir [directoryName] This option indicates the name of a directory which will be used to store the resulting classes and resources. Only one of -outJar or -outDir can be used. -outJniInclude [fileName] This option indicates the name of a file which will contain an a set of #defines which map the original JNI method names to the new obfuscated method names.
Copyright © 2003 Patrick Mueller. All rights reserved. Portions of this program (the BCEL library) are:
Last updated on 2003/10/18 at 01:09. |