java-deobfuscator / deobfuscator

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

Help with understanding how this program work #639

Closed iGabyTM closed 3 years ago

iGabyTM commented 3 years ago

I have tried to deobfuscate a jar file for testing and I can't figure out how to add the libraries used. This is my config:

input: in.jar
output: out.jar
path:
  - D:/Program Files/Java/jdk8u242-b08-jre/lib/rt.jar
  - D:/Projects/MinecraftServers/test/server.jar
libraries:
  - D:/Projects/MinecraftServers/test/server.jar
transformers:
  - normalizer.SourceFileClassNormalizer
  - normalizer.MethodNormalizer: {}
Could not locate a class file.
Have you added the necessary files to the -path argument?
The error was:
com.javadeobfuscator.deobfuscator.exceptions.NoClassInPathException: org/bukkit/event/Listener

Also, I noticed that MethodNormalizer require a value named mapping-file, how do I generate one?

ItzSomebody commented 3 years ago

Taking a quick peek at the AbtractNormalizer and MethodNormalizer classes, it doesn't look like the mapping-file field is actually used anywhere.

Regarding the NoClassInPathException, make sure you're using a server jar which contains the Bukkit API (spigot, paperspigot, craftbukkit, etc.).

fee1-dead commented 3 years ago

Obfuscation maps: #459 For how to use the program, documentation: #207

Your configuration looks correct to me, just make sure that the server.jar contains the class that you are looking for.