Hi Sourabh,
other than using some kind of obfuscator you may protect your source by
using some little expedients.First, you have to add a non-sense istruction
(it could make the decompiler to crash while not altering your applcation).
Example: at the end of a method, after the 'return' statement, insert an istruction.
Second, you can force the decompiler(written i C or in any other non-java language)to
have a crash caused by a buffer overflow. As you know Java doesn't give limitations to
the lenght of the variables/names length..so you can add to your code a
(not-really-useful)method whith a long name, or a similar one that instantiates many
variabiles. Two examples follow.
public class TestClass{
/* Protection Variable.
The variable's name is costituited by 4K characters.*/
int xxxxxxxxxxxxxxxxxxxxxxx.....xxxxxx ;
// Class methods...
}
or
public void protectionMethod(){
int v001 = 0 ;
int v001 = 0 ;
..
// Here put up to 550 variabiles.
..
int v550 = 0 ;
}
The last way to protect your source is to crypt your classes and write a specific
class loader.
All the solutions listed are not 100% secure..but imho they are useful to improve the
protection of your code.I hope you'll find them interesting.
Cheers.
~ hi gurus,
~ i wanted some info on java code protection. i know of obfuscators... and ~ ~ have
downloaded some of them for trial. Is there
~ any other way which u have used for protecting the java code. Also if u ~ ~ have
used any obfuscator earlier, please send me
~ the details and your feedback of the same. Its very urgent for me. I have ~
downloaded the foll obfuscators codeshield,
~ condensity, zelix klassmaster, jobfuscate, JCloak (from force5).
~ thanks in advance,
~ -sourabh
~ ----
~ Sourabh Kulkarni
~ Embedded Systems Group.
~ rapidEffect (P) Ltd.25,Napier Road, Pune 411 001
~ Tel./Fax. +91-20-6363250
~
~ www.rapideffect.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html