java-deobfuscator / deobfuscator

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

Deobfuscating failed #808

Open Cakeprogress opened 3 years ago

Cakeprogress commented 3 years ago

I have problem, with deobfuscating mod.

I used all zelix tranformer

[Thread-8] INFO com.javadeobfuscator.deobfuscator.Deobfuscator - Running com.javadeobfuscator.deobfuscator.transformers.zelix.ReflectionObfuscationTransformer
[Zelix] [ReflectionObfuscationTransformer] Starting
[Zelix] [ReflectionObfuscationTransformer] Finding reflection obfuscation
[Zelix] [ReflectionObfuscationTransformer] Found 4482 reflection obfuscation instructions
Error while fully initializing net/k773/cabinet/gui/symbols/Userbar
java.lang.NullPointerException
    at java.lang.reflect.Array.get(Native Method)
    at com.javadeobfuscator.deobfuscator.executor.MethodExecutor.executeArrayLoad(MethodExecutor.java:98)
    at com.javadeobfuscator.deobfuscator.executor.MethodExecutor.execute(MethodExecutor.java:505)
    at com.javadeobfuscator.deobfuscator.executor.MethodExecutor.execute(MethodExecutor.java:76)
    at com.javadeobfuscator.deobfuscator.executor.defined.MappedMethodProvider.invokeMethod(MappedMethodProvider.java:54)
    at com.javadeobfuscator.deobfuscator.executor.providers.DelegatingProvider.invokeMethod(DelegatingProvider.java:35)
    at com.javadeobfuscator.deobfuscator.executor.MethodExecutor.execute(MethodExecutor.java:1394)
    at com.javadeobfuscator.deobfuscator.executor.MethodExecutor.execute(MethodExecutor.java:76)
    at com.javadeobfuscator.deobfuscator.transformers.zelix.ReflectionObfuscationTransformer.inlineReflection(ReflectionObfuscationTransformer.java:248)
    at com.javadeobfuscator.deobfuscator.transformers.zelix.ReflectionObfuscationTransformer.transform(ReflectionObfuscationTransformer.java:73)
    at com.javadeobfuscator.deobfuscator.Deobfuscator.runFromConfig(Deobfuscator.java:459)
    at com.javadeobfuscator.deobfuscator.Deobfuscator.start(Deobfuscator.java:416)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.javadeobfuscator.deobfuscator.ui.wrap.Deobfuscator.run(Deobfuscator.java:84)
    at com.javadeobfuscator.deobfuscator.ui.SwingWindow.lambda$null$16(SwingWindow.java:1014)
    at java.lang.Thread.run(Unknown Source)

Deobfuscation failed. Please open a ticket on GitHub and provide the following error:
com.javadeobfuscator.deobfuscator.executor.exceptions.NoSuchMethodHandlerException: Could not find invoker for java/lang/Object java/lang/String toCharArray()[C @ net/k773/cabinet/a a(J)I
    at com.javadeobfuscator.deobfuscator.executor.MethodExecutor.execute(MethodExecutor.java:1248)
    at com.javadeobfuscator.deobfuscator.executor.MethodExecutor.execute(MethodExecutor.java:76)
    at com.javadeobfuscator.deobfuscator.executor.defined.MappedMethodProvider.invokeMethod(MappedMethodProvider.java:54)
    at com.javadeobfuscator.deobfuscator.executor.providers.DelegatingProvider.invokeMethod(DelegatingProvider.java:35)
    at com.javadeobfuscator.deobfuscator.executor.MethodExecutor.execute(MethodExecutor.java:1394)
    at com.javadeobfuscator.deobfuscator.executor.MethodExecutor.execute(MethodExecutor.java:76)
    at com.javadeobfuscator.deobfuscator.transformers.zelix.ReflectionObfuscationTransformer.inlineReflection(ReflectionObfuscationTransformer.java:258)
    at com.javadeobfuscator.deobfuscator.transformers.zelix.ReflectionObfuscationTransformer.transform(ReflectionObfuscationTransformer.java:73)
    at com.javadeobfuscator.deobfuscator.Deobfuscator.runFromConfig(Deobfuscator.java:459)
    at com.javadeobfuscator.deobfuscator.Deobfuscator.start(Deobfuscator.java:416)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.javadeobfuscator.deobfuscator.ui.wrap.Deobfuscator.run(Deobfuscator.java:84)
    at com.javadeobfuscator.deobfuscator.ui.SwingWindow.lambda$null$16(SwingWindow.java:1014)

FILE:

https://drive.google.com/file/d/1zP4HiSNpWtaJllFXuEP1rnycVnZ6jwv-/view?usp=sharing

Janmm14 commented 3 years ago

file not accessible, it violates google's terms. Only provide the file if you are allowed to, see #653. If the file is accessible for free by its creators, just link the public download.

General tips on zelix deobfuscation: https://github.com/java-deobfuscator/deobfuscator/blob/master/commonerrors/Zelix.md

Its often not a good idea to hammer all deobfuscators onto it, use the tips linked and add one transformer after the other. The tips state for example that you should use the StringEncryptionTransformer first. Also it often helps if you provide the rt.jar / java.base in the path section of the deobfuscator-gui.

Cakeprogress commented 3 years ago

I first used a stringtransformer from Zelix, after which I tried to use a Reflection transformer. But I get an error, I also attach the file.

https://dropmefiles.com/gJOss

Janmm14 commented 3 years ago

I could not reproduce your error. You are likely not using the latest version of the deobfuscator. When using the GUI, you still have to update the deobfuscator.jar in the folder of deobfuscator-gui.jar with releases from this repository.

All I did were some code changes to not hard-fail on missing classes and I stopped removal of methods and classes. Then I ran the result first with rt.jar and forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar in path, then on that result with rt.jar, forge-1.7.10-10.13.4.1614-1.7.10-srg.jar, 1.7.10-10.13.4.1614-1.7.10\unpacked\binaries.jar and 1.7.10.jar in the path. Both times I used zelix.StringEncryptionTransformer and zelix.ReflectionObfuscationTransformer (although the string one can be left out on the second run).

This makes the code readable in most parts, but not completely, since it still missed some library jars for me. The lib files I mentioned above were grabbed out of a subfolder of %userprofile%/.gradle/caches/minecraft.

I will not provide the result jar as I personally do not want to help too much in defeating security mechanisms of minecraft clients.

Also why you do not just send the link to where streamcraft.net provides the download? This would've been much easier for you and for me, since that second file download page disliked my chrome and firefox and i had to resort to the shitty edge browser.

ItzSomebody commented 3 years ago

@CakeProgress: Any update on this?

Cakeprogress commented 3 years ago

This file was stored on their server and downloaded to the client, so I can't provide a direct link, https://dropmefiles.com/W27uV

could you give me a deobfuscated version?

Cakeprogress commented 3 years ago

Because I still don't understand how to deobuff this modification

Janmm14 commented 3 years ago

Because I still don't understand how to deobuff this modification

I will not provide the result jar as I personally do not want to help too much in defeating security mechanisms of minecraft clients.

This is my final decision.

Cakeprogress commented 3 years ago

this is not a security mechanism, but a regular GUI interface from minecraft) I have an earlier version without a buffer, and here it is with it, and I couldn't remove it