java-deobfuscator / deobfuscator

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

can deobfuscator remove unused local variables? #680

Closed naitz1337 closed 3 years ago

naitz1337 commented 3 years ago

deobfuscator is generating unused local variables, how can i fix?

Janmm14 commented 3 years ago

The deobfuscator is not meant to make decompiled code to look pretty. The deobfuscator is mainly meant to remove string obfuscation, control flow obfuscation and indirect method invocations (reflection, invokedynamic).

At the end of deobfuscation you can always put general.peephole.PeepholeOptimizer once. This will attempt to make the bytecode cleaner for decompilation tools.

Decompilation is best done halfmanually with BytecodeViewer. Look at decompilation results of different decompilers to decide which one to use. Sometimes some classes are better decompiled with one decompiler andothers with another decompiler. Also some decompilers have some settings to tweak which could maybe improve code quality.

Main goal of this deobfuscator is to make obfuscated jvm programs readable and analyzable again and find potential backdoors in java programs.