Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obfuscated 'SourceFile-Attribute' in deobfuscated Inner Classes #5

Open
EmanuelMairoll opened this issue Dec 7, 2017 · 4 comments
Open

Comments

@EmanuelMairoll
Copy link

EmanuelMairoll commented Dec 7, 2017

When deobfuscating a Jar (tested with 1.8.9.jar and stable_20 mappings), despite being named correctly in the code, the "InnerClass-Name" Attribute of the Outer Class Files, as well as the SourceFile-Attribute of Inner Class Files do not change. This actually "confuses" FernFlower decompiling the Inner Classes back to obfuscated names, which makes it pretty much unusable with IntelliJ.

This is a example, namely the C03PacketPlayer and its inner classes, examined with 'Java Class Editor' by tanmaykm: http://classeditor.sourceforge.net
image

image

@octarine-noise
Copy link
Owner

It seems like you are trying to deobfuscate the Minecraft jar itself. This is not the intended use case, ForgeGradle will do that for you. Simpledeobf is meant to deobfuscate other mods, which generally do not have inner classes with obfuscated names.

That being said, this is a possible blind spot, and it looks like it's a (intentional) limitation of the ASM library that I use for the remapping, see here.

I've pushed a commit that will also remap inner class names, but I can't replicate your setup. Can you checkout the master branch, and try deobfuscating with that to see if it solves your problem?

@EmanuelMairoll
Copy link
Author

EmanuelMairoll commented Dec 15, 2017

Despite being such a tiny fix it now seems to works flawlessly.
I already managed to fix it myself using another Application pretty much "fixing" the output jar.
If you are interested, I did not upload it on a GitHub-Repo:
RICAF.txt
Thank you anyways, at least deobfuscating the Minecraft jar itself is now also a feature you can list in your README 🙂

@EmanuelMairoll
Copy link
Author

Wait... I don't really know what is happening there, but...
image

@octarine-noise
Copy link
Owner

Ummm... yeah, looks like it's not quite as simple as that. Names are definitely mixed up, CrashReportCategory and EnumChatFormatting should not be subclasses of C03PacketPlayer.

I'll take a deeper look at what's going on when I have some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants