documentation update

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1214 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
jochen 25 years ago
parent 1e661ada97
commit 3aa4b59217
  1. 5
      jode/doc/Makefile.am
  2. 7
      jode/doc/applet.html
  3. 9
      jode/doc/bluesky.html
  4. 28
      jode/doc/download.html.in
  5. 1
      jode/doc/history.html
  6. 26
      jode/doc/jode.html
  7. 1
      jode/doc/license.html
  8. 68
      jode/doc/links.html
  9. 48
      jode/doc/myproject.jos
  10. 122
      jode/doc/usage.html

@ -1,13 +1,14 @@
## Input file for automake to generate the Makefile.in used by configure
EXTRA_DIST = \
applet.html.in \
applet.html \
download.html.in \
frame.html \
history.html \
jode.html \
license.html \
links.html \
usage.html \
myproject.jos \
dasm_to_java.perl \
gimp/jode-logo.xcf \
jode-logo.gif

@ -24,17 +24,18 @@
<li><a href="usage.html">Usage</a></li>
<li><a href="license.html">License</a></li>
<li><a href="history.html">History</a></li>
<li><a href="links.html">Links</a></li>
<li><a href="bluesky.html">Blue Sky</a></li>
</ul>
</td>
<td>
<h1>The <i>JODE</i> Applet</h1>
<applet code="jode/decompiler/Applet.class" archive="jode-applet.jar" width=540 height=400>
<applet code="jode/Applet.class" archive="jode-applet.jar" width=540 height=400>
<param name=classpath
value="http://www.informatik.uni-oldenburg.de/~mw/plasma.jar">
<param name=class value="PlasmaApplet">
<p>Sorry you need a java enabled browser to test a java applet :-p</p>
<p>Sorry you need a java enabled browser to test a java applet ;-)</p>
<p>Don't read the rest, it only contains information about the applet.</p>
</applet><br><br>
@ -42,7 +43,7 @@ Press the start button to decompile <a
href="http://www.informatik.uni-oldenburg.de/~mw/">Michael</a>'s <a
href="http://www.informatik.uni-oldenburg.de/~mw/plasma.html">Plasma
applet</a>. You may change the classpath and class name to point to a
class file of your choice. But note that most browsers doesn't allow
class file of your choice. But note that most browsers don't allow
loading files from a different server.<br><br>
Save probably doesn't work, because it is forbidden by the browser.<br><br>

@ -25,6 +25,7 @@
<li><a href="download.html">Download</a></li>
<li><a href="usage.html">Usage</a></li>
<li><a href="license.html">License</a></li>
<li><a href="links.html">Links</a></li>
<li><a href="history.html">History</a></li>
<li>Blue Sky</li>
</ul>
@ -73,10 +74,10 @@ MenuItem local_2 = new MenuItem("Save");
</pre>
good names would be <code>miOpen</code> and <code>miSave</code>. </p>
<p>It is currently possible to assign a <i>hint name,type</i> pair to
a local. If the type matches, the local will be named after <i>hint
name</i>. This could be extended by giving them several weighted
hints and constructing the name in an intelligent way. </p>
<p>It is currently possible to assign a <i>(hint name,type)</i> pair
to a local. If the type matches, the local will be named after
<i>hint name</i>. This could be extended by giving them several
weighted hints and constructing the name in an intelligent way. </p>
<h2>Better deobfuscation features</h2>
<p>First there should be a good Renamer: Methods that simply

@ -24,6 +24,7 @@
<li><a href="usage.html">Usage</a></li>
<li><a href="license.html">License</a></li>
<li><a href="history.html">History</a></li>
<li><a href="links.html">Links</a></li>
<li><a href="bluesky.html">Blue Sky</a></li>
</ul>
</td>
@ -34,14 +35,13 @@ archives:
<ul>
<li><a href="jode-@VERSION@-1.1.jar">jode-@VERSION@-1.1.jar</a> is for
JDK&nbsp;1.1. It already contains gnu.getopt, but you need to
download the <a
href="http://java.sun.com/beans/infobus/#DOWNLOAD_COLLECTIONS">collection
classes</a>. If you want to use the swing interface, you have to
download <a href="http://java.sun.com/products/jfc/index.html#download-swing">swing</a> separately. </li> <li><a
href="jode-@VERSION@-1.2.jar">jode-@VERSION@-1.2.jar</a> is for
JDK&nbsp;1.2. It already contains gnu.getopt, so you don't need any
other package.</li>
JDK&nbsp;1.1. It already contains Getopt and the collection classes
from the GNU Classpath project. If you want to use the swing
interface, you have to download swing separately. </li>
<li><a href="jode-@VERSION@-1.2.jar">jode-@VERSION@-1.2.jar</a> is for
JDK&nbsp;1.2. It already contains Getopt, so you don't need any other
package.</li>
</ul>
<a href="jode-@VERSION@.tar.gz">jode-@VERSION@.tar.gz</a> is the source
@ -60,19 +60,25 @@ href="http://sourceware.cygnus.com/cygwin/">cygwin</a> and unzip.</li>
<dd>
<a href="http://java.sun.com/products/jdk/1.1/index.htm">http://java.sun.com/products/jdk/1.1/index.htm</a>
</dd>
<dt>Collection classes and Swing for JDK 1.1:<dt>
<dt><a name="swing">Swing for JDK 1.1:</a><dt>
<dd>
<a href="http://java.sun.com/beans/infobus/#DOWNLOAD_COLLECTIONS">http://java.sun.com/beans/infobus/#DOWNLOAD_COLLECTIONS</a>
<a href="http://java.sun.com/products/jfc/index.html#download-swing">http://java.sun.com/products/jfc/index.html#download-swing</a>
</dd>
<dt>JDK 1.2:</dt>
<dd>
<a href="http://java.sun.com/products/jdk/1.2/index.html">http://java.sun.com/products/jdk/1.2/index.html</a>
</dd>
<dt>Getopt:</dt>
<dt><a name="getopt">Getopt</a>:</dt>
<dd>
<a href="http://www.urbanophile.com/arenn/hacking/download.html#getopt">http://www.urbanophile.com/arenn/hacking/download.html#getopt</a>
</dd>
<dt><a name="collections">Collection Classes</a>:</dt>
<dd>I have written a small script that puts the collection classes
from the <a href="http://www.classpath.org">GNU Classpath Project</a> into
its own package (<code>org.gnu.java.util.collections</code>). You can
download the <a href="collections.tar.gz">source code</a> (including
the script), or <a href="collections.jar">a precompiled jar file</a>.
</dd>
</dl>
</td>
</table>

@ -24,6 +24,7 @@
<li><a href="usage.html">Usage</a></li>
<li><a href="license.html">License</a></li>
<li>History</li>
<li><a href="links.html">Links</a></li>
<li><a href="bluesky.html">Blue Sky</a></li>
</ul>
</td>

@ -8,7 +8,7 @@
java-decompiler, reverse engineering, free, GPL">
<meta name="robots" content="index">
<meta name="robots" content="nofollow">
<meta name="date" content="1999-10-24">
<meta name="date" content="2000-01-24">
</head>
<body>
@ -23,13 +23,14 @@ java-decompiler, reverse engineering, free, GPL">
<br><br>
<a
href="http://www.informatik.uni-oldenburg.de/~delwi/jode/jode.html">
<B>Jode</B></a>
<B>Jode (WWW)</B></a>
<ul>
<li><a href="applet.html">Test It Online</a></li>
<li><a href="download.html">Download</a></li>
<li><a href="usage.html">Usage</a></li>
<li><a href="license.html">License</a></li>
<li><a href="history.html">History</a></li>
<li><a href="links.html">Links</a></li>
<li><a href="bluesky.html">Blue Sky</a></li>
</ul>
</td>
@ -83,9 +84,13 @@ config file</li>
(they can be conditionally, so that only one is actually excuted),
jode refuses to mark it as final. This can make decompilation of
method scoped classes wrong. </li>
<li>There's a bug in ConstantAnalyzer (part of the obfuscator). It is
triggered very seldom, and produces incorrect code. Use it with
care.</li>
<li>There's probably a bug in LocalOptimizer (part of the obfuscator).
It is triggered very seldom, and may produces incorrect code. If your
application doesn't work after obfuscation, or is refused by the
bytecode verifier, try again without the LocalOptimizer. If this was
the reason send me your class file ;-)
</li>
</ul>
<p>Now follows a list of oddities, that will probably never get
@ -115,11 +120,10 @@ those that occur on some of the <code>jode.test</code> files, I would
be very interested in a bug report (including the <code>class</code>
file, if possible).</p>
<p>Sometimes <i>JODE</i> generates some GOTO expression and labels. This
shouldn't happen any more with code produced by javac or jikes.
But some flow obfuscator likes Zelix Klassmaster may provoke this.
In that case you can run the Obfuscator first (to optimize away the
flow obfuscation ;-).</p>
<p>Sometimes <i>JODE</i> 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 ;-).</p>
</td>
</table>
@ -127,7 +131,7 @@ file, if possible).</p>
<p><A HREF="mailto:Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE">
http://www.informatik.uni-oldenburg.de/~delwi/jode/jode.html</A>, last
updated on <em>24-Okt-1999</em>.</p>
updated on <em>24-Jan-2000</em>.</p>
</body>
</html>

@ -24,6 +24,7 @@
<li><a href="usage.html">Usage</a></li>
<li>License</li>
<li><a href="history.html">History</a></li>
<li><a href="links.html">Links</a></li>
<li><a href="bluesky.html">Blue Sky</a></li>
</ul>
</td>

@ -0,0 +1,68 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<html>
<head>
<title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="robots" content="noindex">
<meta name="date" content="2000-01-24">
</head>
<body>
<table cellpadding=4 cellspacing=1 width=100%>
<tr>
<td></td>
<td> <img src="jode-logo.gif" alt="JODE" width=286 height=110></td>
</tr>
<tr>
<td valign="top">
<B><a href="http://www.informatik.uni-oldenburg.de/~delwi">Homepage</a></B>
<br><br>
<a href="jode.html"><B>Jode</B></a>
<ul>
<li><a href="applet.html">Test It Online</a></li>
<li><a href="download.html">Download</a></li>
<li><a href="usage.html">Usage</a></li>
<li><a href="license.html">License</a></li>
<li><a href="history.html">History</a></li>
<li>Links</li>
<li><a href="bluesky.html">Blue Sky</a></li>
</ul>
</td>
<td>
<h1><i>JODE</i> Links</h1>
<h3>Other decompilers</h3>
<ul>
<li>A list of decompilers can be found at <a href="http://www.meurrens.org/ip-Links/Java/CodeEngineering/#tocDecompilersToJava">Marc Meurren's list</a>
</li>
<li>A very fast decompiler is <a
href="http://www.geocities.com/SiliconValley/Bridge/8617/jad.html">jad</a>
written in C++. It doesn't come with source code though, and misses
some features <i>JODE</i> has ;-)</li> <li><a
href="http://www.javaworld.com/javaworld/jw-07-1997/jw-07-decompilers.html">A
comparison of three decompilers</a> (but not <i>JODE</i>) was done by Dave
Dyer.
</ul>
<h3>Other obfuscators</h3>
<ul>
<li><a href="http://www.sbktech.org/hashjava_old.html">Hashjava</a> is another free obfuscator. It is no longer maintained, though, since its successor was commercialized.</li>
<li><a href="http://www.zelix.com/klassmaster/index.html">Zelix
Klassmaster</a> does a very good flow optimization and also decrypts
strings. But <i>JODE</i> can now undo both.</li>
</ul>
<h3>Graphical User Interface</h3>
<ul>
<li><i>JODE</i> is now used by the <a
href="http://www.icg-online.de/jedit/JavaInsight.html">JavaInsight plugin</a> for
<a href="http://www.gjt.org/~sp/jedit.html">jEdit</a>.</li>
</ul>
</td>
</table>
<hr>
<p><A HREF="mailto:Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE">
http://www.informatik.uni-oldenburg.de/~delwi/jode/usage.html</A>, last
updated on <em>24-Jan-2000</em>.</p>
</body>
</html>

@ -1,28 +1,52 @@
# This is a sample script file to obfuscate my project
# The class path should include everything that is needed to run the
# project. Don't forget the java base classes (rt.jar or classes.zip).
classpath = "c:\\jdk1.2\\jre\\lib\\rt.jar","d:\\project\\java"
# The jar, zip file or directory in which the obfuscated class files
# should be written.
dest = "obfuscated.zip"
# Write the reverse translation table to translat.tbl. With the help of
# this table you can later undo the renaming.
revtable = "translat.tbl"
strip = "unreach","lvt","inner"
# this variable will tell, which classes and packages should be included
# in the obfuscated.jar package.
load = new WildCard { value = "org.myorg.myproject" },
new WildCard { value = "org.myorg.mylib*" },
new WildCard { value = "org.otherorg.shortlib" }
preserve = new WildCard { value = "org.myorg.application.main.*" },
new WildCard { value = "org.myorg.applet.<init>.()V" },
new WildCard { value = "org.resources.bundle*.<init>.()V" },
# this variable will tell, which classes and packages must not be
# renamed.
preserve = new WildCard { value = "org.myorg.ApplicationClass.main.*" },
new WildCard { value = "org.myorg.AppletClass.<init>.()V" },
new WildCard { value = "org.resources.BundleClass*.<init>.()V" },
new MultiIdentifierMatcher {
and = new WildCard { value = "org.myorg.publiclib.*" },
new ModifierMatcher { access = "PUBLIC" }
}
renamer = new KeywordRenamer {
backup = new StrongRenamer {
charsetStart = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
charsetPart =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"
charsetPackage = "abcdefghijklmnopqrstuvwxyz"
charsetClass = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}
# There are different renamers currently. This is just an example that
# produces very good obfuscated code, that is still valid bytecode.
renamer = new StrongRenamer {
charsetStart = "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ"
charsetPart = "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0123456789_$"
charsetPackage = "abcdefghijklmnopqrstuvwxyz"
charsetClass = "abcdefghijklmnopqrstuvwxyz"
}
analyzer = new SimpleAnalyzer
# The constant analyzer does a great job to remove constant fields and
# deadcode. E.g. if you obfuscate the decompiler applet it will
# remove the whole debugging code, since the applet doesn't need it.
analyzer = new ConstantAnalyzer
# The LocalOptimizer will reorder local variables to use fewer slots.
# It may still have some bugs, so remove it if your applet doesn't
# work (and send me the class).
# The RemovePopAnalyzer will remove instructions that were optimized
# away by the ConstantAnalyzer and LocalOptimizer.
post = new LocalOptimizer, new RemovePopAnalyzer

@ -3,7 +3,7 @@
<head>
<title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="robots" content="noindex">
<meta name="date" content="1999-10-24">
<meta name="date" content="2000-01-30">
</head>
<body>
@ -25,10 +25,12 @@
&nbsp;&nbsp;&nbsp;<a href="#cmdline">Command&nbsp;Line</a><br>
&nbsp;&nbsp;&nbsp;<a href="#awt">AWT&nbsp;Interface</a><br>
&nbsp;&nbsp;&nbsp;<a href="#swing">Swing&nbsp;Interface</a><br>
&nbsp;&nbsp;&nbsp;<a href="#java">Java&nbsp;Interface</a><br>
<a href="#optimizer">Obfuscator</a><br>
</li><br>
<li><a href="license.html">License</a></li>
<li><a href="history.html">History</a></li>
<li><a href="links.html">Links</a></li>
<li><a href="bluesky.html">Blue Sky</a></li>
</ul>
</td>
@ -48,6 +50,13 @@ set CLASSPATH=C:\download\jode-xxx.jar;C:\swing\swingall.jar
or for csh:
<pre>setenv CLASSPATH /tmp/jode-xxx.jar:/usr/local/swing/swingall.jar</pre>
</ul>
<br>
There is also a batch file for windows and a script file for unix,
that you can use. Adapt the CLASSPATH in the file and put it to a
convenient location.
<pre>
jar -xvf jode-xxx.jar bin/jode.bat <i>resp.</i> bin/jode
</pre>
<a name="cmdline"><h3>Command Line Interface</h3></a>
@ -66,7 +75,7 @@ The AWT Interface looks exactly like the <a
href="applet.html">applet</a>. In fact the applet uses the AWT
Interface. You start it after setting the <tt>CLASSPATH</tt> (see <a
href="#decompiler">above</a>), with
<pre>java jode.JodeWindow</pre>
<pre>java jode.decompiler.Window</pre>
In the classpath line you can enter a number of jar files, zip files
and directories separated by comma(<tt>,</tt>). Then enter the
@ -78,7 +87,10 @@ appear. You can save it via the <code>save</code> button.
For the swing interface you need java version 1.2 or the separately
available swing package (see <a href="download.html#swing">download
page</a>. <br>
page</a>. You can invoke it like this:
<pre>
java jode.swingui.Main --classpath classes.jar
</pre>
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
@ -86,20 +98,57 @@ 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.<br>
The swing interface is very nice, if you just want to work how
something works, and you don't have the source code. It is especially
useful to trace bugs through library code. It is not meant to
generate <tt>java</tt> files and so you won't find a save option
there.<br>
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 <tt>java</tt> files and so
you won't find a save option there.<br>
<a name="java"><h3>Java Interface</h3></a>
If you want to integrate <i>JODE</i> into your own java program, you
can use the <code>jode.decompiler.Decompile</code> class. Note that
the GPL only allows you to integrate <i>JODE</i> into GPL programs.
Please contact me if, so I can put you on my <a href="links.html">link
page</a> and keep you informed about new releases.<br>
You may use this <a href="jode-embedded.jar">stripped down jar
archive</a> containing all necessery classes.
<a name="optimizer"><h1>Using the Obfuscator</h1>
To use the obfuscator you have to create a script file, say <a
href="myproject.jos"><tt>myproject.jos</tt></a>, with
the following contents (You have to adapt it to match your project, of
course). It should contain the following options:
To use the obfuscator you should first create a script file, say <a
href="myproject.jos"><tt>myproject.jos</tt></a>. Then you can invoke the
obfuscator with:
<pre>
java jode.obfuscator.Main myproject.jos
</pre>
<p>The script file should contain the following options: </p>
<p>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 <code>classes.zip</code> or
<code>rt.jar</code>))</p>
<pre>
classpath = "c:\\jdk1.2\\jre\\lib\\rt.jar","d:\\project\\java",
"ftp://www.myorg.org/pub/classlib.jar"
</pre>
<p>First select what you want to strip. There are several
<p>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.</p>
<pre>
dest = "obfuscated.zip"
</pre>
<p>You can make <i>JODE</i> 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.</p>
<pre>
revtable = "translat.tbl"
</pre>
<p>Select what you want to strip. There are several
possibilities, which can be separated by comma(<tt>,</tt>):</p>
<dl>
<dt>unreach</dt>
@ -117,8 +166,11 @@ possibilities, which can be separated by comma(<tt>,</tt>):</p>
strip = "unreach","lvt","inner"
</pre>
<p>Select the packages and classes you want to obfuscate. You
should only include libraries, that you don't ship separately.</p>
<p>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
<code>*</code> as wild card, that matches everything (including dots).
</p>
<pre>
load = new WildCard { value = "org.myorg.myproject" },
new WildCard { value = "org.myorg.mylib*" },
@ -133,9 +185,9 @@ name and the type signature to identify your method. <tt>javap
-s</tt> will show you the type signatures for your classes, but you
may also use <tt>*</tt>, to select all methods with that name.</p>
<pre>
preserve = new WildCard { value = "org.myorg.application.main.*" },
new WildCard { value = "org.myorg.applet.&lt;init&gt;.()V" },
new WildCard { value = "org.resources.bundle*.&lt;init&gt;.()V" }
preserve = new WildCard { value = "org.myorg.ApplicationClass.main.*" },
new WildCard { value = "org.myorg.AppletClass.&lt;init&gt;.()V" },
new WildCard { value = "org.resources.Bundle*.&lt;init&gt;.()V" },
</pre>
<p>If you want to obfuscate (or just shorten) the identifier you can
@ -153,12 +205,21 @@ option that is not very strong, but very confusing.</dd>
<dt>KeywordRenamer</dt>
<dd>Renames identifiers to keyword. You can give your own list of
keywords as parameters. Resulting code is not decompilable directly,
but it is legal bytecode.</dd>
<b>but it is <i>not</i> legal bytecode either</b>. Some paranoid
web browsers refuse to run applets containing keywords as identifiers
(and they are completely within the Java VM spec).</dd>
</dl>
<pre>
renamer = new KeywordRenamer
renamer = new StrongRenamer
</pre>
<p>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.<p>
<pre>
table = "translat.tbl"
</pre>
<p>Now you can select the analyzer. The purpose of the
analyzer is to mark all reachable methods, find out which methods
@ -168,22 +229,26 @@ for <tt>Enumeration</tt>s). There are currently two analyzers.
<dl><dt>SimpleAnalyzer</dt>
<dd>Straight forward analyzer. It is fast and will remove dead code
on method basis.</dd>
<dd><dt>ConstantAnalyzer</dt>
<dd><dt>ConstantAnalyzer</dt>
<dd>Strong analyzer that will determine, which fields and instructions
have constant values. It will remove dead code on instruction basis
and replace constant instruction with a load constant, or remove them
completely.<br> This analyzer is especially useful to revert Zelix
Klassmaster's flow obfuscation.</dd>
and replace constant instruction with a load of the constant, or
remove them completely.<br> This analyzer is especially useful to
revert the flow obfuscation of some other obfuscators.</dd>
</dl>
</p>
<pre>
analyzer = new SimpleAnalyzer
analyzer = new ConstantAnalyzer
</pre>
<p>Pre- and Post transformers transform the bytecode before
resp. after the Analyzer runs. Using this defaults should be
okay.</p>
resp. after the Analyzer runs. Using this default should be okay.
You may remove the LocalOptimizer, though, if you have problems.</p>
<p>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.</p>
<pre>
post = new LocalOptimizer, new RemovePopAnalyzer
</pre>
@ -195,8 +260,7 @@ post = new LocalOptimizer, new RemovePopAnalyzer
<p><A HREF="mailto:Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE">
http://www.informatik.uni-oldenburg.de/~delwi/jode/usage.html</A>, last
updated on <em>24-Okt-1999</em>.</p>
updated on <em>30-Jan-2000</em>.</p>
</body>
</html>

Loading…
Cancel
Save