Use @OriginalXXX annotations to create a mapping file #65

Open
opened 4 years ago by gpe · 3 comments
gpe commented 4 years ago
Owner

There are lots of interesting use cases for this:

  • If we implement tracking local vars too, we can use it to implement new bytecode-based deobfuscation techniques without losing all the names.
  • We could distribute the mapping file to users (as I think it'd be hard to argue it contains Jagex's IP) and they could apply it to their local deobs.
  • Similarly, users could contribute additional mappings back to the 'canonical' copy. We'd need some sort of incremental support for this (probably writing a JavaParser-based tool to apply the mapping to an exist set of .java files, in addition to the bytecode deobfuscator accepting a mapping file).
There are lots of interesting use cases for this: * If we implement tracking local vars too, we can use it to implement new bytecode-based deobfuscation techniques without losing all the names. * We could distribute the mapping file to users (as I think it'd be hard to argue it contains Jagex's IP) and they could apply it to their local deobs. * Similarly, users could contribute additional mappings back to the 'canonical' copy. We'd need some sort of incremental support for this (probably writing a JavaParser-based tool to apply the mapping to an exist set of .java files, in addition to the bytecode deobfuscator accepting a mapping file).
gpe added the
deobfuscator
label 4 years ago
gpe added the
feature
label 4 years ago
Poster
Owner

This now works for class names, method/field names and method/field owners.

We still need to add:

  • method argument names
  • method argument order (blocked on the IR)
  • local variable names (blocked on Fernflower patches + adjustments to our custom .class file attribute)
This now works for class names, method/field names and method/field owners. We still need to add: * method argument names * method argument order (blocked on the IR) * local variable names (blocked on Fernflower patches + adjustments to our custom .class file attribute)
Poster
Owner

Argument and local variable names are done.

Argument order is the only thing that is left. It's blocked on the IR. I might open a separate issue for it, and close this one.

Argument and local variable names are done. Argument order is the only thing that is left. It's blocked on the IR. I might open a separate issue for it, and close this one.
Poster
Owner

It'd be good to preserve the order of fields/methods within a class.

It'd be good to preserve the order of fields/methods within a class.
Sign in to join this conversation.
Loading…
There is no content yet.