AutoAuth module

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

1 implementationMISC

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)MISCsrc/main/java/thunder/hack/features/modules/misc/AutoAuth.javaJava · 72 lines · 3.4 KB

Logs you on the servers.

SettingsModePasswordShowPassword
AutoAuth.javaJava · Minecraft 26.2 · 72 lines · 3.4 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.misc;
2
3
import meteordevelopment.orbit.EventHandler;
4
import net.minecraft.ChatFormatting;
5
import net.minecraft.network.protocol.game.ClientboundSystemChatPacket;
6
import org.jetbrains.annotations.NotNull;
7
import thunder.hack.core.Managers;
8
import thunder.hack.events.impl.PacketEvent;
9
import thunder.hack.features.modules.Module;
10
import thunder.hack.gui.notification.Notification;
11
import thunder.hack.setting.Setting;
12
import org.apache.commons.lang3.RandomStringUtils;
13
14
import static thunder.hack.features.modules.client.ClientSettings.isRu;
15
16
public final class AutoAuth extends Module {
17
    private final Setting<Mode> mode = new Setting<>("Mode", Mode.Custom);
18
    private final Setting<String> cpass = new Setting<>("Password", "babidjon777", v -> mode.getValue() == Mode.Custom);
19
    private final Setting<Boolean> show = new Setting<>("ShowPassword", true);
20
21
    public AutoAuth() {
22
        super("AutoAuth", Category.MISC);
23
    }
24
25
    private enum Mode {
26
        Custom, Random, Qwerty
27
    }
28
29
    @Override
30
    public void onEnable() {
31
        String warningMsg = isRu() ?
32
                ChatFormatting.RED + "Внимание! " + ChatFormatting.RESET + "Пароль сохраняется в конфиге, перед передачей конфига " + ChatFormatting.RED + " ВЫКЛЮЧИ МОДУЛЬ!" :
33
                ChatFormatting.RED + "Attention! " + ChatFormatting.RESET + "The passwords are stored in the config, so before sharing your configs " + ChatFormatting.RED + " TOGGLE OFF THE MODULE!";
34
        sendMessage(warningMsg);
35
    }
36
37
    @Override
38
    public void onDisable() {
39
        sendMessage("Resetting password...");
40
        cpass.setValue("none");
41
    }
42
43
    @EventHandler
44
    public void onPacketReceive(PacketEvent.@NotNull Receive event) {
45
        if (event.getPacket() instanceof ClientboundSystemChatPacket pac && mc.getConnection() != null) {
46
            String password = "";
47
            switch (mode.getValue()) {
48
                case Custom -> {
49
                    password = cpass.getValue();
50
                    if (password.isEmpty()) {
51
                        sendMessage(ChatFormatting.RED + (isRu() ? "Ошибка регистрации: Пароль пуст!" : "Registration error: Password is empty!"));
52
                        return;
53
                    }
54
                }
55
                case Qwerty -> password = "qwerty123";
56
                case Random -> password = RandomStringUtils.randomAlphabetic(5) + RandomStringUtils.randomPrint(5);
57
            }
58
59
            String m = pac.content().getString().toLowerCase();
60
61
            if (m.contains("/reg") || m.contains("/register") || m.contains("зарегистрируйтесь")) {
62
                mc.getConnection().sendCommand("reg " + password + " " + password);
63
                if (show.getValue()) sendMessage((isRu() ? "Твой пароль: " : "Your password: ") + ChatFormatting.RED + password);
64
                Managers.NOTIFICATION.publicity("AutoAuth", isRu() ? "Выполнена регистрация!" : "Registration completed!", 4, Notification.Type.SUCCESS);
65
            } else if (m.contains("авторизуйтесь") || m.contains("/l")) {
66
                mc.getConnection().sendCommand("login " + password);
67
                Managers.NOTIFICATION.publicity("AutoAuth", isRu() ? "Выполнен вход!" : "Logged in!", 4, Notification.Type.SUCCESS);
68
            }
69
        }
70
    }
71
}
72