Recaf ignoring classes.
Describe the bug
Recaf does not process any of the obfuscated classes when I provide a obfuscated jar, it is only showing assets such as json, png, and yml. When I try to open the jar with a ZipInputStream in java it says it is encrypted, the file is not encrypted, it can be accessed via WinRar. The classes are obfuscated with ".class/" at the end of each class which tricks WinRar into thinking they are folders. The fix I used is to patch the zip file by replacing ".class/" with ".class" and setting each ZipEntry compression level to -1 to open the jar with recaf.
To Reproduce
Steps to reproduce the behavior:
- Open sample.jar using Recaf.
Console Output
19:12:45.065 [ForkJoinPool-1-worker-1] INFO : Loaded workspace from: sample.jar
19:12:45.065 [ForkJoinPool-1-worker-2] DEBUG: Begin generating phantom classes, given 0 input classes
19:12:45.066 [ForkJoinPool-1-worker-1] INFO : Detected 0 illegal names
19:12:45.148 [ForkJoinPool-1-worker-2] DEBUG: Phantom analysis complete, generated 0 classes
19:12:45.149 [ForkJoinPool-1-worker-2] DEBUG: Generated 0 phantom classes in 83 ms
Screenshots
Recaf 2X/3X use older versions of the ZIP parser library we made to handle such cases. The updated parser supports these cases. I've not backported its use from 4X down to 3X.
Closing as 4.X is the only branch we're working on going forward, and it addresses the issue.