Open Videogamer555 opened 1 year ago
the solution is to analyze and handle everything while it stays inside a jar/zip file. When obfuscation got removed you can use proguard to rename stuff - (this deobfucator already has a class renaming transformer but I suggest to use proguard for this task after deobfuscaton)
Obfuscation is often using reflection or other mechanisms which indirectly reference classes by their name, so its not good to use that as first step.
There's a Jar file that I'm trying to deobfuscate, where the first step is going to be to create Windows compatible file names. Currently, some of the Java class file names differ only by case, like A.class and a.class which is NOT compatible with any Windows file system. It may work in the file systems used by some other OS's, but definitely not anything used by Windows (like FAT, FAT32, NTFS, or exFAT). It also appears to be completely valid in a zip/jar file. And there lies the problem. While this hasn't been a problem with the game Minecraft, I'm trying to deobfuscate the jar for a different Java application, which does have this problem.
The solution seems simple. Make your deobfuscator recognize class file names that differ only by the case of the letters, and then rename these class files that (as far as Windows is concerned) are duplicate files, followed by properly renaming every reference to those renamed files within all the class files that contained references to the class files that had to be renamed.