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

Decompiling with --obfuscationpath does not create local variable names using deobfuscated name #32

Open
Marcono1234 opened this issue Oct 22, 2019 · 1 comment

Comments

@Marcono1234
Copy link
Contributor

CFR version

0.147

Description

When decompiling with the newly introduced --obfuscationpath option, local variables names are not generated based on the deobfuscated name. E.g. if a class MyClass is obfuscated to a, then a local variable of type MyClass will be named a1 instead of myClass.

public class MyClass {
    public void doSomething(OtherClass b2, String string) {
        OtherClass b3 = new OtherClass();
        if (b2 != null) {
            b3 = b2;
        }
        b3.toString();
    }
}

Reproduction steps

  1. Download
  2. Run CFR
    java -jar ./cfr-0.147.jar var-name-obf.jar --obfuscationpath mappings.txt
    
@leibnitz27
Copy link
Owner

This one is unlikely to change in the near future. The obfuscation rewriter is implemented as a display layer (rather than an explicit rewrite), as all resolution etc needs to use obfuscated names.

As such, local variable names have been assigned by this point - and sufficient context isn't available in the display layer to rewrite these.

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