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. 46
      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 ## Input file for automake to generate the Makefile.in used by configure
EXTRA_DIST = \ EXTRA_DIST = \
applet.html.in \ applet.html \
download.html.in \ download.html.in \
frame.html \
history.html \ history.html \
jode.html \ jode.html \
license.html \ license.html \
links.html \
usage.html \ usage.html \
myproject.jos \ myproject.jos \
dasm_to_java.perl \ dasm_to_java.perl \
gimp/jode-logo.xcf \
jode-logo.gif jode-logo.gif

@ -24,17 +24,18 @@
<li><a href="usage.html">Usage</a></li> <li><a href="usage.html">Usage</a></li>
<li><a href="license.html">License</a></li> <li><a href="license.html">License</a></li>
<li><a href="history.html">History</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> <li><a href="bluesky.html">Blue Sky</a></li>
</ul> </ul>
</td> </td>
<td> <td>
<h1>The <i>JODE</i> Applet</h1> <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 <param name=classpath
value="http://www.informatik.uni-oldenburg.de/~mw/plasma.jar"> value="http://www.informatik.uni-oldenburg.de/~mw/plasma.jar">
<param name=class value="PlasmaApplet"> <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> <p>Don't read the rest, it only contains information about the applet.</p>
</applet><br><br> </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/">Michael</a>'s <a
href="http://www.informatik.uni-oldenburg.de/~mw/plasma.html">Plasma 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 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> loading files from a different server.<br><br>
Save probably doesn't work, because it is forbidden by the browser.<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="download.html">Download</a></li>
<li><a href="usage.html">Usage</a></li> <li><a href="usage.html">Usage</a></li>
<li><a href="license.html">License</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><a href="history.html">History</a></li>
<li>Blue Sky</li> <li>Blue Sky</li>
</ul> </ul>
@ -73,10 +74,10 @@ MenuItem local_2 = new MenuItem("Save");
</pre> </pre>
good names would be <code>miOpen</code> and <code>miSave</code>. </p> 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 <p>It is currently possible to assign a <i>(hint name,type)</i> pair
a local. If the type matches, the local will be named after <i>hint to a local. If the type matches, the local will be named after
name</i>. This could be extended by giving them several weighted <i>hint name</i>. This could be extended by giving them several
hints and constructing the name in an intelligent way. </p> weighted hints and constructing the name in an intelligent way. </p>
<h2>Better deobfuscation features</h2> <h2>Better deobfuscation features</h2>
<p>First there should be a good Renamer: Methods that simply <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="usage.html">Usage</a></li>
<li><a href="license.html">License</a></li> <li><a href="license.html">License</a></li>
<li><a href="history.html">History</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> <li><a href="bluesky.html">Blue Sky</a></li>
</ul> </ul>
</td> </td>
@ -34,14 +35,13 @@ archives:
<ul> <ul>
<li><a href="jode-@VERSION@-1.1.jar">jode-@VERSION@-1.1.jar</a> is for <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 JDK&nbsp;1.1. It already contains Getopt and the collection classes
download the <a from the GNU Classpath project. If you want to use the swing
href="http://java.sun.com/beans/infobus/#DOWNLOAD_COLLECTIONS">collection interface, you have to download swing separately. </li>
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 <li><a href="jode-@VERSION@-1.2.jar">jode-@VERSION@-1.2.jar</a> is for
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
JDK&nbsp;1.2. It already contains gnu.getopt, so you don't need any package.</li>
other package.</li>
</ul> </ul>
<a href="jode-@VERSION@.tar.gz">jode-@VERSION@.tar.gz</a> is the source <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> <dd>
<a href="http://java.sun.com/products/jdk/1.1/index.htm">http://java.sun.com/products/jdk/1.1/index.htm</a> <a href="http://java.sun.com/products/jdk/1.1/index.htm">http://java.sun.com/products/jdk/1.1/index.htm</a>
</dd> </dd>
<dt>Collection classes and Swing for JDK 1.1:<dt> <dt><a name="swing">Swing for JDK 1.1:</a><dt>
<dd> <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> <a href="http://java.sun.com/products/jfc/index.html#download-swing">http://java.sun.com/products/jfc/index.html#download-swing</a>
</dd> </dd>
<dt>JDK 1.2:</dt> <dt>JDK 1.2:</dt>
<dd> <dd>
<a href="http://java.sun.com/products/jdk/1.2/index.html">http://java.sun.com/products/jdk/1.2/index.html</a> <a href="http://java.sun.com/products/jdk/1.2/index.html">http://java.sun.com/products/jdk/1.2/index.html</a>
</dd> </dd>
<dt>Getopt:</dt> <dt><a name="getopt">Getopt</a>:</dt>
<dd> <dd>
<a href="http://www.urbanophile.com/arenn/hacking/download.html#getopt">http://www.urbanophile.com/arenn/hacking/download.html#getopt</a> <a href="http://www.urbanophile.com/arenn/hacking/download.html#getopt">http://www.urbanophile.com/arenn/hacking/download.html#getopt</a>
</dd> </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> </dl>
</td> </td>
</table> </table>

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

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

@ -24,6 +24,7 @@
<li><a href="usage.html">Usage</a></li> <li><a href="usage.html">Usage</a></li>
<li>License</li> <li>License</li>
<li><a href="history.html">History</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> <li><a href="bluesky.html">Blue Sky</a></li>
</ul> </ul>
</td> </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 # 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" 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" }, load = new WildCard { value = "org.myorg.myproject" },
new WildCard { value = "org.myorg.mylib*" }, new WildCard { value = "org.myorg.mylib*" },
new WildCard { value = "org.otherorg.shortlib" } new WildCard { value = "org.otherorg.shortlib" }
preserve = new WildCard { value = "org.myorg.application.main.*" }, # this variable will tell, which classes and packages must not be
new WildCard { value = "org.myorg.applet.<init>.()V" }, # renamed.
new WildCard { value = "org.resources.bundle*.<init>.()V" }, 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 { new MultiIdentifierMatcher {
and = new WildCard { value = "org.myorg.publiclib.*" }, and = new WildCard { value = "org.myorg.publiclib.*" },
new ModifierMatcher { access = "PUBLIC" } new ModifierMatcher { access = "PUBLIC" }
} }
renamer = new KeywordRenamer { # There are different renamers currently. This is just an example that
backup = new StrongRenamer { # produces very good obfuscated code, that is still valid bytecode.
charsetStart = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" renamer = new StrongRenamer {
charsetPart = charsetStart = "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" charsetPart = "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0123456789_$"
charsetPackage = "abcdefghijklmnopqrstuvwxyz" charsetPackage = "abcdefghijklmnopqrstuvwxyz"
charsetClass = "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 post = new LocalOptimizer, new RemovePopAnalyzer

@ -3,7 +3,7 @@
<head> <head>
<title>Java Optimize and Decompile Environment (JODE)</title> <title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="robots" content="noindex"> <meta name="robots" content="noindex">
<meta name="date" content="1999-10-24"> <meta name="date" content="2000-01-30">
</head> </head>
<body> <body>
@ -25,10 +25,12 @@
&nbsp;&nbsp;&nbsp;<a href="#cmdline">Command&nbsp;Line</a><br> &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="#awt">AWT&nbsp;Interface</a><br>
&nbsp;&nbsp;&nbsp;<a href="#swing">Swing&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> <a href="#optimizer">Obfuscator</a><br>
</li><br> </li><br>
<li><a href="license.html">License</a></li> <li><a href="license.html">License</a></li>
<li><a href="history.html">History</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> <li><a href="bluesky.html">Blue Sky</a></li>
</ul> </ul>
</td> </td>
@ -48,6 +50,13 @@ set CLASSPATH=C:\download\jode-xxx.jar;C:\swing\swingall.jar
or for csh: or for csh:
<pre>setenv CLASSPATH /tmp/jode-xxx.jar:/usr/local/swing/swingall.jar</pre> <pre>setenv CLASSPATH /tmp/jode-xxx.jar:/usr/local/swing/swingall.jar</pre>
</ul> </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> <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 href="applet.html">applet</a>. In fact the applet uses the AWT
Interface. You start it after setting the <tt>CLASSPATH</tt> (see <a Interface. You start it after setting the <tt>CLASSPATH</tt> (see <a
href="#decompiler">above</a>), with 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 In the classpath line you can enter a number of jar files, zip files
and directories separated by comma(<tt>,</tt>). Then enter the 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 For the swing interface you need java version 1.2 or the separately
available swing package (see <a href="download.html#swing">download 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 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 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 change the classpath or switch between package hierarchie tree and
class inheritence tree.<br> class inheritence tree.<br>
The swing interface is very nice, if you just want to work how The swing interface is very useful to browse through class files if
something works, and you don't have the source code. It is especially you don't have the source code. You can also use it to trace bugs in
useful to trace bugs through library code. It is not meant to library code. It is not meant to generate <tt>java</tt> files and so
generate <tt>java</tt> files and so you won't find a save option you won't find a save option there.<br>
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> <a name="optimizer"><h1>Using the Obfuscator</h1>
To use the obfuscator you have to create a script file, say <a To use the obfuscator you should first create a script file, say <a
href="myproject.jos"><tt>myproject.jos</tt></a>, with href="myproject.jos"><tt>myproject.jos</tt></a>. Then you can invoke the
the following contents (You have to adapt it to match your project, of obfuscator with:
course). It should contain the following options: <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> possibilities, which can be separated by comma(<tt>,</tt>):</p>
<dl> <dl>
<dt>unreach</dt> <dt>unreach</dt>
@ -117,8 +166,11 @@ possibilities, which can be separated by comma(<tt>,</tt>):</p>
strip = "unreach","lvt","inner" strip = "unreach","lvt","inner"
</pre> </pre>
<p>Select the packages and classes you want to obfuscate. You <p>Select the packages and classes you want to obfuscate. You should
should only include libraries, that you don't ship separately.</p> 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> <pre>
load = new WildCard { value = "org.myorg.myproject" }, load = new WildCard { value = "org.myorg.myproject" },
new WildCard { value = "org.myorg.mylib*" }, 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 -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> may also use <tt>*</tt>, to select all methods with that name.</p>
<pre> <pre>
preserve = new WildCard { value = "org.myorg.application.main.*" }, preserve = new WildCard { value = "org.myorg.ApplicationClass.main.*" },
new WildCard { value = "org.myorg.applet.&lt;init&gt;.()V" }, new WildCard { value = "org.myorg.AppletClass.&lt;init&gt;.()V" },
new WildCard { value = "org.resources.bundle*.&lt;init&gt;.()V" } new WildCard { value = "org.resources.Bundle*.&lt;init&gt;.()V" },
</pre> </pre>
<p>If you want to obfuscate (or just shorten) the identifier you can <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> <dt>KeywordRenamer</dt>
<dd>Renames identifiers to keyword. You can give your own list of <dd>Renames identifiers to keyword. You can give your own list of
keywords as parameters. Resulting code is not decompilable directly, 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> </dl>
<pre> <pre>
renamer = new KeywordRenamer renamer = new StrongRenamer
</pre> </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 <p>Now you can select the analyzer. The purpose of the
analyzer is to mark all reachable methods, find out which methods 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> <dl><dt>SimpleAnalyzer</dt>
<dd>Straight forward analyzer. It is fast and will remove dead code <dd>Straight forward analyzer. It is fast and will remove dead code
on method basis.</dd> on method basis.</dd>
<dd><dt>ConstantAnalyzer</dt>
<dd><dt>ConstantAnalyzer</dt>
<dd>Strong analyzer that will determine, which fields and instructions <dd>Strong analyzer that will determine, which fields and instructions
have constant values. It will remove dead code on instruction basis have constant values. It will remove dead code on instruction basis
and replace constant instruction with a load constant, or remove them and replace constant instruction with a load of the constant, or
completely.<br> This analyzer is especially useful to revert Zelix remove them completely.<br> This analyzer is especially useful to
Klassmaster's flow obfuscation.</dd> revert the flow obfuscation of some other obfuscators.</dd>
</dl> </dl>
</p> </p>
<pre> <pre>
analyzer = new SimpleAnalyzer analyzer = new ConstantAnalyzer
</pre> </pre>
<p>Pre- and Post transformers transform the bytecode before <p>Pre- and Post transformers transform the bytecode before
resp. after the Analyzer runs. Using this defaults should be resp. after the Analyzer runs. Using this default should be okay.
okay.</p> 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> <pre>
post = new LocalOptimizer, new RemovePopAnalyzer post = new LocalOptimizer, new RemovePopAnalyzer
</pre> </pre>
@ -195,8 +260,7 @@ post = new LocalOptimizer, new RemovePopAnalyzer
<p><A HREF="mailto:Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE"> <p><A HREF="mailto:Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE">
http://www.informatik.uni-oldenburg.de/~delwi/jode/usage.html</A>, last 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> </body>
</html> </html>

Loading…
Cancel
Save