UnHook module

UnHook: Minecraft 26.3 cheat module, full source for every implementation (1 client: MelaHack (ThunderHack fork)).

1 implementationCLIENT

Clients with this module

Full module source: 1 implementation

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

MelaHack (ThunderHack fork)CLIENTsrc/main/java/thunder/hack/features/modules/client/UnHook.javaJava · 105 lines · 3.9 KB
UnHook.javaJava · Minecraft 26.2 · 105 lines · 3.9 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.client;
2
3
import net.minecraft.ChatFormatting;
4
import net.minecraft.SharedConstants;
5
import thunder.hack.core.Managers;
6
import thunder.hack.core.manager.client.ConfigManager;
7
import thunder.hack.features.modules.Module;
8
import thunder.hack.utility.math.MathUtility;
9
10
import java.io.*;
11
import java.nio.charset.StandardCharsets;
12
import java.util.ArrayList;
13
import java.util.List;
14
15
import static thunder.hack.features.modules.client.ClientSettings.isRu;
16
17
import com.mojang.blaze3d.platform.IconSet;
18
19
public class UnHook extends Module { // Йо фабос, засунь в о4ко себе фалос
20
    public UnHook() {
21
        super("UnHook", Category.CLIENT);
22
    }
23
24
    List<Module> list;
25
26
    public int code = 0;
27
28
    @Override
29
    public void onEnable() {
30
        code = (int) MathUtility.random(10, 99);
31
        for (int i = 0; i < 20; i++)
32
            sendMessage(isRu() ? ChatFormatting.RED + "Ща все свернется, напиши в чат " + ChatFormatting.WHITE + code + ChatFormatting.RED + " чтобы все вернуть!"
33
                    : ChatFormatting.RED + "It's all close now, write to the chat " + ChatFormatting.WHITE + code + ChatFormatting.RED + " to return everything!");
34
35
        list = Managers.MODULE.getEnabledModules();
36
37
        mc.gui.setScreen(null);
38
39
        Managers.ASYNC.run(() -> {
40
            mc.executeIfPossible(() -> {
41
                for (Module module : list) {
42
                    if (module.equals(this))
43
                        continue;
44
                    module.disable();
45
                }
46
                ClientSettings.customMainMenu.setValue(false);
47
48
                // Clean icon
49
                try {
50
                    mc.getWindow().setIcon(mc.getVanillaPackResources(), SharedConstants.getCurrentVersion().stable() ? IconSet.RELEASE : IconSet.SNAPSHOT);
51
                } catch (Exception e) {
52
                }
53
54
                // Clean chat
55
                // Chat display ownership moved into the 26.2 GUI renderer.
56
                setEnabled(true);
57
58
                // Clean log
59
                try {
60
                    File file = new File(mc.gameDirectory + File.separator + "logs" + File.separator + "latest.log");
61
                    FileInputStream fis = new FileInputStream(file);
62
                    BufferedReader reader = new BufferedReader(new InputStreamReader(fis, StandardCharsets.UTF_8));
63
                    ArrayList<String> lines = new ArrayList<>();
64
                    String line;
65
                    while ((line = reader.readLine()) != null) {
66
                        if(line.contains("thunderhack") || line.contains("ThunderHack") || line.contains("$$") || line.contains("\\______/")
67
                                || line.contains("By pan4ur, 06ED") || line.contains("\u26A1") || line.contains("thunder.hack"))
68
                            continue;
69
                        lines.add(line);
70
                    }
71
                    fis.close();
72
                    try (BufferedWriter writer = new BufferedWriter(new FileWriter(file, StandardCharsets.UTF_8))) {
73
                        for (String s : lines)
74
                            writer.write(s + "\n");
75
                    } catch (Exception ignored) {
76
                    }
77
78
                    // Rename cfg dir
79
                    ConfigManager.MAIN_FOLDER.renameTo(new File("XaeroWaypoints_BACKUP092738"));
80
                } catch (IOException ignored) {
81
                }
82
            });
83
        }, 5000);
84
    }
85
86
    @Override
87
    public void onDisable() {
88
        if (list == null)
89
            return;
90
91
        for (Module module : list) {
92
            if (module.equals(this))
93
                continue;
94
            module.enable();
95
        }
96
        ClientSettings.customMainMenu.setValue(true);
97
98
        // Rename cfg dir back
99
        try {
100
            new File("XaeroWaypoints_BACKUP092738").renameTo(new File("ThunderHackRecode"));
101
        } catch (Exception e) {
102
        }
103
    }
104
}
105