4

I have a jar in which the class files have been obfuscated. I'm happy to manually deobfuscate it, but the problem is that the class names are so long that windows won't save them to disk. Is there any tool that will take in a jar and rename all classes, and preferably also methods and fields?

Also, do not give answers saying that there is no good reason for decompiling etc. as they neither contribute any useful information to the community nor hold true. In my case, I'm checking for a security problem in this particular application.

Leagsaidh Gordon
  • 1,641
  • 5
  • 19
  • 28
  • 1
    Have you checked http://stackoverflow.com/questions/1662766/tool-to-deobfuscate-java-codes ? – Thilo Jun 24 '12 at 07:36
  • @Thilo Yes, but they all require the classes to be extracted from the jar (as far as I could tell anyway). – Leagsaidh Gordon Jun 24 '12 at 08:31
  • Have you tried to get a non-obfuscated version from the manufacturer? It is in their interest too if you address security issues. – rsp Jun 24 '12 at 08:43
  • 4
    *"Also, do not give answers saying that there is no good reason for decompiling etc."* - I won't. But I will say that if you can't get non-obfuscated code from your vendor, you should start looking for a new vendor. **And tell us who they are so that we can avoid them too!** – Stephen C Jun 24 '12 at 09:50
  • For what it's worth, using a //?/ prefix on filenames allows a lot more freedom in filenames on Windows (for example, the length limit increases to around 30k and a lot of special characters are allowed). – Antimony Jul 28 '13 at 19:54

2 Answers2

2

The best way to approach this with modern tools would be to use Proguard to simply class/member names. Then using a tool such as Enigma to manually create mappings.

I'm also writing a program in Java-ASM that takes mappings and converts them into a runnable Jar. Engima by itself doesn't fair to well when exporting.

Display Name
  • 942
  • 1
  • 10
  • 20
1

I would probably use a deobfuscator in a virtual machine and some linux distro.
After the deobfuscation you can pack the files in a zip / jar and continue development in your Windows environment.

I would recommend VirtualBox with Ubuntu.

mercutio
  • 1,065
  • 7
  • 18