From 0243eb4f23a97c8346ec5e7d6b99bbe5465f4b5f Mon Sep 17 00:00:00 2001
From: hoenicke Please be patience, loading the applet may take some time. Press the start button to decompile Michael's
-Plasma applet (and give the decompiler some time to download the
-jar file).
-
-
-Powered by
Best viewed with
-
-
-Home |
-Project page |
-Applet |
-Download |
-Feedback |
-Documentation |
-License |
-History |
-Links |
-Blue Sky
-
-The JODE Applet
-
-
-
-%3a
instead of a
-colon `:' in the url. You can also point it to a directory containing
-the class-files (include a slash `/' at the end in this case), but
-this is not recommended, since it is very slow. You may give
-multiple entries in the class path field separated by a comma.
-
-You can't use this applet for local files; the class files must be on
-a server that is accessible from sourceforge. You can try to give
-local filenames directly without the load.php wrapper, but that is
-probably forbidden by your browser. Most browser only allow loading
-files from the same server as the applet, and this is the reason why
-you have to use such a cryptic URL.
-
-Save probably doesn't work, because it is forbidden by your browser.
-
-
-
-
-
diff --git a/jode/doc/applet.php b/jode/doc/applet.php
index cd6b70a..14c07c5 100644
--- a/jode/doc/applet.php
+++ b/jode/doc/applet.php
@@ -6,7 +6,7 @@
-
-
-
-
%3a
instead of a
-colon `:' in the url. You can also point it to a directory containing
+choice, using a similar syntax. Only http and ftp addresses are supported.
+The file must be available from the world wide web. In fact you download it
+from Sourceforge and Sourceforge gets it from the given address. This hack
+is necessary, because Java's security policy doesn't allow applets to contact
+a different server. You can also point the classpath to a directory containing
the class-files (include a slash `/' at the end in this case), but
this is not recommended, since it is very slow. You may give
multiple entries in the class path field separated by a comma.Powered by Best viewed with |
-Home | -Project page | -Applet | -Download | -Feedback | -Documentation | -License | -History | -Links | -Blue Sky |
This section contains features that I think would be great to have, -but are also very hard to implement. The name of the section is -inspired, by Mozilla.
- -Currently this are all my own ideas. But if you send me an idea -for an interesting feature, I will add it to this list.
- -If java gets called with `-O
' switch, it inlines methods,
-that are private, final, or static and contain no loops. When
-decompiling this it sometimes produces really ugly code. The right
-way to solve this would be to outline the code again. This is
-possible but requires to find the inlined method.
The name `outline' was suggested by Michael. -
- -The local variable naming is very stupid. Even with pretty it just -names the variable after the type with a unifying number appended. A -method containing very much objects of the same type looks very -ugly.
- -My plan is looking at the assignments. If we have locals in -assignments -
-int l_1 = array.length -String l_2 = object.getName() --we could name them "length" and "name". If we -have assignments: -
-MenuItem local_1 = new MenuItem("Open"); -MenuItem local_2 = new MenuItem("Save"); --good names would be
miOpen
and miSave
.
-
-It is currently possible to assign a (hint name,type) pair -to a local. If the type matches, the local will be named after -hint name. This could be extended by giving them several -weighted hints and constructing the name in an intelligent way.
- -First there should be a good Renamer: Methods that simply -return a field value should be renamed to getFieldName. -Fields should be named after their type, maybe also by assignments -(see section about local variable names).
- -The deobfuscator should detect inner and anonymous variables, -synthetic methods and so on, and rename them accordingly.
- -The obfuscator should detect Class.forName constructs (and -similarly for methods and fields) and if their parameters are constant -it should change the parameter according to the rename function.
- -It would be nice if the decompiler could merge the javadoc comments -into the class file. More and more people use javadoc to comment the -public api of their java classes. It shouldn't be too difficult to -copy them back into the java code.
- -This doesn't need to be built into the decompiler. A script that takes -the javadoc pages and the decompiled code can easily merge them.
-- - |
Powered by Best viewed with |
-Home | -Project page | -Applet | -Download | -Feedback | -Documentation | -License | -History | -Links | -Blue Sky |
Click here to download -the latest released source code of JODE . You need several -other packages to build JODE, check the links page.
- -The simplest way to get it, especially for non unix users, is in -precompiled form, though. I have two jar archives at the ftp server. You may -need to press shift while clicking on the link, depending on your -browser. - - -
You can get the latest sources from the CVS
-repository. They may not always compile, though. If you want an
-older version you can use the -r
option:
-r jode_1_0_93
: gives you the version 1.0.93-r branch_1_1
: gives you the latest version that will
-become 1.1To build the sources from CVS change to the main directory where
-the configure.in
file resides and run
-
-
aclocal && automake -a && autoconf- -Afterwards follow the instruction in the INSTALL file. - -
- - |
Click here to download -the latest released source code of JODE . You need several -other packages to build JODE, check the links page.
+Jode is available in the +sflink("project/showfiles.php")?>download area in source or +binary form. For compiling the source code, you need several other +packages, check the links page. You +need a unix like environment for compilation.
The simplest way to get it, especially for non unix users, is in -precompiled form, though. I have two jar archives at the ftp server. You may -need to press shift while clicking on the link, depending on your -browser. +precompiled form, though. There are two jar archives in the download +area:
-jode-".$version.$what.".jar"; -} ?> +You can get the latest sources from the CVS
-repository. They may not always compile, though. If you want an
-older version you can use the -r
option:
jode
as modulename. If you want to checkout a
+specific version you can use the -r
option:
+
-r jode_1_0_93
: gives you the version 1.0.93-r branch_1_1
: gives you the latest version that will
-become 1.1-r jode_1_0_93
: checks out the version 1.0.93-r branch_1_1
: checks out the latest version in the
+1.1 series.To build the sources from CVS change to the main directory where
the configure.in
file resides and run
@@ -43,5 +36,5 @@ the configure.in
file resides and run
aclocal && automake -a && autoconfAfterwards follow the instruction in the INSTALL file. - + diff --git a/jode/doc/faq.php b/jode/doc/faq.php new file mode 100644 index 0000000..5aa6d74 --- /dev/null +++ b/jode/doc/faq.php @@ -0,0 +1,72 @@ + + +
The class isn't verifiable, probably because there is not enough +information about used classes. See the question about the +classpath.
+ +This could also be caused by malicious bytecode, or because there +is a bug in Jode's verifier.
+ +Jode needs to know the full class hierarchie to guess the types. +This includes not only the classes in the program, but also the +libraries used by the java program, even the Java runtime library. +You should set the classpath to include all these classes.
+ +If you don't specify the classpath on the command line, Jode uses +the same as your Java Virtual Machine.
+ +As last resort, if Jode can't find a class in the classpath it uses +reflection to ask the Virtual Machine. This works quite well, but +loading classes can have side effects, e.g. when AWT classes are +loaded, an AWT thread is created, even though Jode doesn't need +it.
+ +MyClass$Inner.class
?You should decompile the outermost class (MyClass
in
+this case). The produced code contains the inner class.
The program, all libraries, the Java runtime library. Don't omit a +library even when you don't want to obfuscate it.
+ +The most common mistake is to preserve a class. In most cases this +is not what you want. This only makes sure the class won't be +renamed, it doesn't prevent it from being stripped. Instead you +should preserve methods and constructors. The constructor is just a +method with the special name <init&rt;.
+ +Another common mistake is to omit the type +signature, e.g. to preserve Class.main instead of +Class.main.([Ljava/lang/String;)V. That doesn't work. If +you don't want to care about the format of the type signature use a +wildcard as in Class.main.*.
+ +The type signature is a machine readable representation of a java +type that is used all over in java bytecode. The JDK ships a command +named javap. With java -s you can lists the fields +and methods of a class with their type signatures.
+ +If you are interested in the format of type signatures read the +Java Virtual Machine Specification, Chapter 4.3 Descriptors
+ + + diff --git a/jode/doc/feedback.html b/jode/doc/feedback.html deleted file mode 100644 index 29a52d4..0000000 --- a/jode/doc/feedback.html +++ /dev/null @@ -1,83 +0,0 @@ - - - -Powered by Best viewed with |
-Home | -Project page | -Applet | -Download | -Feedback | -Documentation | -License | -History | -Links | -Blue Sky |
You can report bugs to the bug forum. -Please send me a short notice if you add a bug.
- -You can contact me per email via hoenicke at -users.sourceforge.net. Please mention jode in the -subject.
- -There is a mailing list. Check this page for subscription informations.
- - - -- - |
You can report bugs to the bug forum. -Please send me a short notice if you add a bug.
+You can report bugs to the bug forum.
-You can contact me per email via You can contact me by email via hoenicke at -users.sourceforge.net. Please mention Jode in the +users.sourceforge.net. Please mention jode in the subject.
There is a mailing list. Check this page for subscription informations.
- - diff --git a/jode/doc/footer.inc b/jode/doc/footer.inc index 1294ad1..bb3b3d5 100644 --- a/jode/doc/footer.inc +++ b/jode/doc/footer.inc @@ -2,8 +2,8 @@
-
-
-
- - History- -Someday I found Now while the Just for the records: the java code is now more than 50 times -bigger than the original perl script and is still growing. -
- - - - JODE is a java package containing a decompiler and an -optimizer for java. This package is freely available under the GPL -(see license). - - The decompiler takes class files as input and produces -something similar to the original java file. Of course this -can't be perfect: There is no way to produce the comments or the names -of local variables (except when compiled with debuging) and there are -often more ways to write the same thing. But JODE does its job -quite well, so you should give it a try: start -the applet. - -The optimizer transforms class files in various ways with -can be controlled by a script file. It supports the following -operations: -
News- -
Limitations- -If not all dependent classes can be found, the verifier (which is
- run before decompilation starts) may exit with a type error. You
- can decompile it with --verify=off, but take the warning
- serious, that types may be incorrect. There's sometimes no way to
- guess the right type, if you don't have access the full class
- hierarchie. There may be situations, where the code doesn't understand complex -expressions. In this case many ugly temporary variables are used, but -the code should still be compileable. This does especially happen -when you compile with `-O' flag and javac has inlined some -methods. - -Sometimes this program may exit with an Sometimes JODE generates some GOTO expression and labels. -This shouldn't happen any more with code produced by javac or jikes. -But some flow obfuscator may provoke this. In that case you can run -the Obfuscator first (to optimize away the flow obfuscation ;-). -
JODE is a java package containing a decompiler and an -optimizer for java. This package is freely available under the GPL -(see license). +optimizer for java. This package is freely available under the GNU GPL. - The decompiler takes class files as input and produces -something similar to the original java file. Of course this -can't be perfect: There is no way to produce the comments or the names -of local variables (except when compiled with debuging) and there are -often more ways to write the same thing. But JODE does its job -quite well, so you should give it a try: selflink("applet") ?>start -the applet. +The decompiler reads in class files and produces something +similar to the original java file. Of course this can't be +perfect: There is no way to produce the comments or the names of local +variables (except when compiled with debuging) and there are often +more ways to write the same thing. However, JODE does its job quite +well, so you should give it a try and selflink("applet") ?>start the +applet. The optimizer transforms class files in various ways with can be controlled by a script file. It supports the following @@ -28,14 +28,23 @@ fields News
Known bugs of the decompiler+ +Some jdk1.3 synthetic access functions aren't understood. The + produced source contains access$xxx functions, but it still compiles. + +There may be other bugs, that cause Exceptions or invalid code.
+ If you have such a problems don't hesitate to issue a bug report.
+ Please include the LimitationsIf not all dependent classes can be found, the verifier (which is @@ -55,15 +64,4 @@ the code should still be compileable. This does especially happen when you compile with `-O' flag and javac has inlined some methods. -Sometimes this program may exit with an Sometimes JODE generates some GOTO expression and labels. -This shouldn't happen any more with code produced by javac or jikes. -But some flow obfuscator may provoke this. In that case you can run -the Obfuscator first (to optimize away the flow obfuscation ;-). diff --git a/jode/doc/license.html b/jode/doc/license.html deleted file mode 100644 index e182c7b..0000000 --- a/jode/doc/license.html +++ /dev/null @@ -1,80 +0,0 @@ - - - -
- - License-JODE is Copyright © 1998-2000 by Jochen Hoenicke. This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. See the -GNU General Public License for more details. - -
- - JODE Links-Other decompilers-
Other obfuscators-
Graphical User Interface-
Miscellanous packages needed to run JODE-
JODE LinksOther decompilers
Software Directories+
Miscellanous packages needed to run JODE
- - - Using the Decompiler-After you have downloaded the necessary -packages, put them into your CLASSPATH: - --There is also a batch file for windows and a script file for unix, -that you can use. You can extract it with the following command: - - jar -xvf jode-1.0.93-1.1.jar bin/jode.bat resp. bin/jode --Edit the file to adapt it to your needs and put it to a convenient -location. - - Command Line Interface- -The most powerful way to start JODE's decompiler is the command -line interface. Some people don't like long command lines; they -should go to the next section.- -Start the class jode.decompiler.Main with the options. The -following command will give a complete list of the available commands: - - java jode.decompiler.Main --help- -If you have adapted the batch file/script, you can use it like this: - jode --help- - AWT Interface- -The AWT Interface looks exactly like the applet. In fact the applet uses the AWT Interface. You start it -after setting the CLASSPATH (see above), with - -java jode.decompiler.Window- -In the classpath line you can enter a number of jar files, zip files -and directories separated by comma(,). Then enter the -dot(.) separated name of the class you want to decompile. -Press the start button and the decompiled class should
-appear. You can save it via the save button.
-
-Swing Interface- -For the swing interface you need java version 1.2 or the separately -available swing package (see link -page. You can invoke it like this: --java jode.swingui.Main --classpath classes.jar -resp.jode swi --classpath classes.jar -- -The swing interface will show the package hierarchie of all classes -in the classpath on the left side. You can now select a class and the -decompiled code will appear on the right side. Via the menu, you may -change the classpath or switch between package hierarchie tree and -class inheritence tree. - -The swing interface is very useful to browse through class files if -you don't have the source code. You can also use it to trace bugs in -library code. It is not meant to generate java files and so -you won't find a save option there. - - Java Interface- -If you want to integrate JODE into your own java program,
-you can use the You may use this stripped -down jar archive containing all necessary classes. - -Using the Obfuscator- -To use the obfuscator you should first create a script file, say myproject.jos. Then you can invoke the -obfuscator with: - -java jode.obfuscator.Main myproject.jos -- - The script file should contain the following options: - -First select the classpath. You should include everything in the
-classpath that you need to run your application. This also includes
-the system class files (Sun puts them into -classpath = "c:\\jdk1.2\\jre\\lib\\rt.jar","d:\\project\\java", - "ftp://www.myorg.org/pub/classlib.jar" -- - Specify where you want the obfuscated classes to go. I recommend -to write them directly into a zip file, but you can also give a -directory. --dest = "obfuscated.zip" -- - You can make JODE write its translation table. This table -can be used later to undo the name obfuscation, or you can look there -to decrypt exceptions you may get. --revtable = "translat.tbl" -- - Select what you want to strip. There are several -possibilities, which can be separated by comma(,): -
-strip = "unreach","lvt","inner" -- - Select the packages and classes you want to obfuscate. You should
-only include libraries, that you don't ship separately. If you give a
-package, all classes and subpackages are loaded. You can also use
- -load = new WildCard { value = "org.myorg.myproject" }, - new WildCard { value = "org.myorg.mylib*" }, - new WildCard { value = "org.otherorg.shortlib" } -- - Select the methods and classes you want to preserve. This is
-the main method for applications and the default constructor
-<init>.()V for applets, resource bundles and other classes
-that you load manually at runtime. -preserve = new WildCard { value = "org.myorg.ApplicationClass.main.*" }, - new WildCard { value = "org.myorg.AppletClass.<init>.()V" }, - new WildCard { value = "org.resources.Bundle*.<init>.()V" }, -- - If you want to obfuscate (or just shorten) the identifier you can -specify a renamer. There are currently following renamer -available --renamer = new StrongRenamer -- - You can also create a renaming table with the same format as the -table written by revtable. The entries in the table get precedence -over renamer. Entries not in the table will get renamed by the -renamer. - -table = "translat.tbl" -- - Now you can select the analyzer. The purpose of the -analyzer is to mark all reachable methods, find out which methods -needs to get the same name (overloading), and which method names -mustn't change (overload of library methods, e.g. nextElement -for Enumerations). There are currently two analyzers. - -analyzer = new ConstantAnalyzer -- - Pre- and Post transformers transform the bytecode before -resp. after the Analyzer runs. Using this default should be okay. -You may remove the LocalOptimizer, though, if you have problems. -In the future I may add some new post transformers, that do string -encryption, flow obfuscation and similar things. If you want to write -your own Transformers please contact me, since the next version will -change the bytecode interface. --post = new LocalOptimizer, new RemovePopAnalyzer --
Using the Decompiler-After you have downloaded the necessary -packages, put them into your CLASSPATH: +After you have downloaded the jar archive +put it into your CLASSPATH. The package +swingall.jar is also needed if you are using JDK 1.1. There is also a batch file for windows and a script file for unix, that you can use. You can extract it with the following command: - jar -xvf jode-.jar bin/jode.bat resp. bin/jode + jar -xvf jode-.jar bin/jode.bat resp. bin/jode-Edit the file to adapt it to your needs and put it to a convenient -location. +Edit the file to adapt it to your paths and put it to a convenient location. Command Line Interface@@ -42,8 +43,12 @@ following command will give a complete list of the available commands:java jode.decompiler.Main --help-If you have adapted the batch file/script, you can use it like this: - jode --help+If you want to decompile a jar package you can do it this way: + + java jode.decompiler.Main --dest srcdir program.jar+ +If you have installed the batch file/script, you can use it like this: + jode --dest srcdir program.jar AWT Interface@@ -64,35 +69,36 @@ appear. You can save it via thesave button.
For the swing interface you need java version 1.2 or the separately
available swing package (see link
-page. You can invoke it like this:
+page. You can invoke it with the following command:
-java jode.swingui.Main --classpath classes.jar -resp.jode swi --classpath classes.jar +java jode.swingui.Main classes.jar +resp. jode swi classes.jar-The swing interface will show the package hierarchie of all classes + The swing interface will show the package hierarchie of all classes
in the classpath on the left side. You can now select a class and the
decompiled code will appear on the right side. Via the menu, you may
change the classpath or switch between package hierarchie tree and
-class inheritence tree. The swing interface is very useful to browse through class files if
you don't have the source code. You can also use it to trace bugs in
library code. It is not meant to generate java files and so
-you won't find a save option there. Java InterfaceIf you want to integrate JODE into your own java program,
you can use the You may use this stripped -down jar archive containing all necessary classes. +You should ship Using the Obfuscator |