aspose file tools*
The moose likes Java in General and the fly likes Obfuscator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Obfuscator" Watch "Obfuscator" New topic
Author

Obfuscator

Malhar Barai
Author
Ranch Hand

Joined: Aug 17, 2001
Posts: 399
what is OBFUSCATOR...& its use...??
tia


Malhar Barai
SOA & Java Book
Tim B.
Greenhorn

Joined: Feb 03, 2003
Posts: 10
Hi Malhar Barai,
As you maybe know Java bytecode (.class and .jar files) contains much of the information stored in your Java source files, leaving your bytecode exposed to reverse engineering and decompiling. An obfuscator program removes the unrequired information, obfuscates symbol names and sometimes even mangles the control-flow of your application to confuse decompilers. All in all obfuscator programs are there to secure your code and to make it harder, if not impossible, to decompile your Java applications.
Greetings,
Tim
Ashish Mahajan
Ranch Hand

Joined: Feb 19, 2003
Posts: 77
Hi Malhar and Tim,
ya, that's the power of obfuscators. But am wondering of one thing :- What about maintenance?? What if the user comes with bug report stating exception something like -
Exception in thread "main" java.lang.NullPointerException:
at g.s(g.java:11)
at f.main(f.java:16)
then it will be developer's nightmare to figure out which (original) class?? which method?? etc.
I think the obfuscator should have a user interface to allow user type obfuscated class name and methods and get the original class/methods as response.
Any input will be highly appreciated
Thanx.


The best teams have no specialists, only general contributors with special skills
Tim B.
Greenhorn

Joined: Feb 03, 2003
Posts: 10
Hi Ashish,
That's an interesting issue you came up with in your post. It probably wouldn't be that hard to extend an obfuscator with the possibility to create a text file, or some other file, in which a mapping of the renamed functions is stored. I think it would be a lot harder to also keep track of line numbers and other information. And don't forget, the information should be stored in a separate file which would have to be kept by the creators of the application.
But to be honest, if you write a good application, the problem you raise is non existant. Don't get me wrong, I'm not that ignorant that I think you can write an application with no errors, but I think you should write an application in which all possible exceptions are nicely handled. In other words, an application should never show the stacktrace you wrote down, but show a message which is atleast, even when using an obfuscator, meaningful to the user and/or the programmer.
Of course there are still the non catchable errors in Java, but good use of logging should make it always easy for a programmer to find out where something went wrong.
Just my two cents,
Tim
Malhar Barai
Author
Ranch Hand

Joined: Aug 17, 2001
Posts: 399
Originally posted by Ashish Mahajan:
Hi Malhar and Tim,
ya, that's the power of obfuscators. But am wondering of one thing :- What about maintenance?? What if the user comes with bug report stating exception something like -
Exception in thread "main" java.lang.NullPointerException:
at g.s(g.java:11)
at f.main(f.java:16)
then it will be developer's nightmare to figure out which (original) class?? which method?? etc.
I think the obfuscator should have a user interface to allow user type obfuscated class name and methods and get the original class/methods as response.
Any input will be highly appreciated
Thanx.

is this the answer to your problem...
JShrink
for more you can surely go through this..More...
cheers
MB
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Obfuscator