Re: Access the classes JAR file as a ZIP?
kadingserver@gmail.com wrote:
They can alter the decompiled code to fool there server, but this will
still serve as a decent obstacle, especially since the code is
obfuscated. So thats why I was wondering about accessing the JARS on
the classpath.
Then make the code undecompilable (requires post-compilation checks).
Recommendations:
1. Add an invokedynamic instruction and watch the decompilers melt as
they meet an instruction that can't be reproduced using Java.
2. Change an <init> constructor to call the super after doing some
modifications. Valid in JVM spec, not valid in JLS.
3. Separate out the new instruction from the superclass invocation. In
some cases, this won't even violate the JLS but will still cause
meltdowns in decompilers.
4. (The most tortuous, IMO) Write some code where the difference between
fcmpl and fcmpg actually becomes important, flip those in the bytecode,
and then watch as the decompiled output probably doesn't match the exact
functionality of the bytecode. (The instructions differ on what they do
if they meet a NaN) Bonus points for making this functionality
non-intuitive.
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth