3

I have an obfuscated jar file I'm trying to decompile and get into an eclipse project. I can easily view the "source" using a tool like jd-gui but I cant save it because the filenames are too long. I need some sort of tool that can rename the calss name and all instances of that class inside the jar file. I wrote a program to extract all of the files from the jar that renames them to class_1, class_2 ect and save the original name along with the new name in a file. I planned to just do a replace all to rename the instances inside the java files but it wont work because I didn't take packages into account. Also a lot of the classes are named with keywords like super or return which seems to work fine in the .class files but most IDEs get confused by it and throw errors all over the place. Altogether I have 1680 class files and most look like this:

Obfuscated filenames

If anyone can recommend any tools ar methods that will allow me to rename these or at least extract the archive I would appreciate it.

1 Answer 1

3

The Krakatau decompiler will automatically rename the output files to valid filenames if the original class name doesn't correspond to a valid filename.

Note that the original names will still be preserved inside the generated files. As for renaming inside the actual source files, I wrote a script to do that (along with various other deobfuscation scripts) but I haven't publicly released it for various reasons. If you send me the jar I can try to deobfuscate it for you though.

4
  • I tried the krakatau decompiler and it would give a lot of error during the decompilation and would only get through the first few files.
    – Ephyxia
    Mar 6, 2014 at 15:54
  • @Ephyxia Could you please open a bug on Github with the exact error message and jar you are trying to decompile?
    – Antimony
    Mar 6, 2014 at 17:01
  • It tells me the file cant be found. I think its because of the folders that have long names. Some of the files with long names are extracted but only from regular folders.
    – Ephyxia
    Mar 7, 2014 at 19:39
  • @Ephyxia please post an issue on Github with the exact commands and directory structure you're using.
    – Antimony
    Mar 7, 2014 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.