java-deobfuscator / deobfuscator

The real deal
https://javadeobfuscator.com
Apache License 2.0
1.58k stars 292 forks source link

using obfuscation maps #459

Open atesin opened 5 years ago

atesin commented 5 years ago

ATTENTION: i won't release deobfuscated generated code, i will only use it for private analysis in plugin development (anyway if you need it you can do it for yourself also)

...

recently mojang had released minecraft obfuscation maps for server and client to aid the modding community (urls in client.json, see https://minecraft.gamepedia.com/Obfuscation_map )

how these maps can be used to get correct official class/prop/method names?

i am trying to deobfuscate server.jar, my config.yml is as follows

input: mojang_1.14.4.jar
output: mojang_1.14.4_deobf.jar
libraries:
  - "C:\\Program Files\\Java\\jre1.8.0_221\\lib\\rt.jar"
transformers:
  - com.javadeobfuscator.deobfuscator.transformers.normalizer.SourceFileClassNormalizer
mapping-file: server.txt
Janmm14 commented 5 years ago

This deobfuscator doesn't allow mapping input.

I think ProGuard can remap based on an input map.

Otherwise you can use SpecialSource for remapping too, thats what BuildTools uses.

No clue on whether the file format of mojang mappings fits.

apkunpacker commented 5 years ago

not same but similer thing i want that class renamer can take an extra input as optional so i can select a txt file which has many meaningfull class name so after rename jar look easy to read instead of class10, class67 etc.

meponderR commented 4 years ago

You can use Reconstruct to do this.

atesin commented 4 years ago

good hint, thanks, i'll try later

balaramsudip commented 4 years ago

1.14.4 does not have proper deobfuscation maps

meponderR commented 4 years ago

The obfuscation maps for 1.14.4 have been released. Source: Dinnerbone

meponderR commented 4 years ago

When I decompiled it I used jd-cmd and MC-Remapper.

ItzSomebody commented 4 years ago

So this is pretty old, but I'll tag this as a suggestion since there's an unused field value called mapping-file in AbstractNormalizer.java that hasn't been implemented yet.

I think that implementing a mapping-file is more-or-less realistic and within scope of the project, but perhaps let's see what some others say.

fee1-dead commented 4 years ago

FYI, there are transformers for minecraft names, but an ability to use a general obfuscation map would be helpful too.