Hi. I have some code that I need decompiled. I just need one class, with code that I am missing in my current version. So, anyone with a java decompiler able to do this? I need the Objects.Players.Player.class from here: http://horde.wessles.com/. Get 1.3.2, and decompile the jar.
In case you are wondering, I tried to get JAD, and JDGUI, but none of them seem to work on linux, even though they say they do. I just run them, and they dont do anything.
There really isn’t much to decompiling a java class. You can drag and drop entire jar files into this web-page ( http://java.decompiler.free.fr/ Scroll to the bottom) and it will decompile them for you.
It isn’t guaranteed to be a close replica of the code though.
As a side-note, you really should use a version control system like git.
Obfuscation is easy to ‘crack’, depending on what you want to do. Decompile it all, and then choose which parts of the program you want to attack. For example, the network code. All the references to the standard Java libraries are unobfuscated, so so you work backwards from those points… Maybe you want to attack the server, you don’t need to figure out the whole thing.
Don’t forget the code is probably well designed and compartmentalized, so it can be attacked piece by piece.
[quote=“wesley.laferriere”]
You answered your own question. Obfuscation isn’t usually used to stop people from cracking your code - it does help though - there are a lot of ways to ‘crack’ an application without literally ever touching the code - especially something isolated in the JRE. All you have to do is manipulate it’s environment most of the time. Obfuscation is usually used to protect a company’s algorithm from its competitors. It is reversible but usually it costs a lot more money to maintain an obfuscated application than it does to just simply rediscover it.
Your code being well designed and compartmentalized means absolutely nothing after you pass it through an obfuscator - which completely destroys any design you had, pushes classes together, spawns dummy classes, moves class members around etc… If you’ve ever looked at obfuscated code it’s pretty obvious that whatever design was there is completely gone after obfuscation. If it is possible through some seriously convoluted yet minimal overhead generated design - the obstructor will use it.
Jimmit is correct in saying you can’t crack obfuscation in the sense that you can never recover what was there before - you can try to reconstruct the algorithm by closely following the code, but like I said in most cases this is usually more expensive (and sometime unfeasible) depending on how large the module is. It definitely isn’t easy to ‘crack’ or reconstruct an algorithm from obfuscated code.
In any case. Sometimes obfuscation is really the only sensible thing. For example, obfuscating JavaScript code (or java4k games) can reduce the size of the code significantly and in the process save bandwidth and improve the speed of your website. Which is why almost always when you take a look at a website’s source code you see JavaScript more difficult to decipher than ancient hieroglyphs.
That’s true, I forgot to mention that obfuscating code (given you do it by shortening names) cutting dependencies and pushing classes together - you do get a noticeable improvement in size.
I strongly suspect my code is more readable AFTER it has been put through an obfuscator
True, I’ve only dabbled with an obfuscator, and now I recall that I set to only do renames and not change the structure of the code (I didn’t want it to change the execution of some parts)