zeron12

Create a Minecraft client-side mod called AuthyCracker.

Core Idea

AuthyCracker is essentially a Minecraft server password manager, similar to Google Password Manager, but designed for servers using authentication plugins such as AuthMe.

The mod should remember a player's /login password for each server and automatically authenticate them when they reconnect.

Login Flow

When joining a server:

  1. Detect whether the server requires authentication.
  2. If the player manually enters something like:

/login mypassword

  1. Detect the login command without exposing the password anywhere visible.
  2. If this is the first time using that server, show a confirmation:

"Save login credentials for this server?"

* Save * Don't Save * Never ask again for this server

  1. If the player chooses Save, securely store the password associated with that server.

On future connections to the same server:

  1. Detect that authentication is required.
  2. Retrieve the stored credential.
  3. Automatically send:

/login <stored-password>

  1. Do this only after the server actually requests authentication, rather than blindly sending the command immediately.

Premium / Online-Mode Servers

The mod must NOT store or attempt to use passwords for premium/online-mode accounts.

Detect the server/account authentication state where possible.

If the player is already authenticated through Minecraft's official online-mode authentication:

* Do not ask to save a /login password. * Do not automatically send /login. * Treat the server as a premium/online-mode server.

The mod should primarily target cracked/offline-mode servers that use password authentication plugins.

Security

Passwords must NEVER be stored as plaintext.

Use strong authenticated encryption such as AES-256-GCM with a securely generated key.

Requirements:

* Encrypt credentials at rest. * Generate cryptographically secure random IVs/nonces. * Never log passwords. * Never print passwords to chat or console. * Never include passwords in crash reports. * Never expose passwords through debug logging. * Passwords should only be decrypted in memory immediately before they are required. * Clear sensitive temporary data from memory when practical. * Store only the minimum information required.

Example conceptual storage:

text
Server identifier
    ↓
Encrypted credential
    ↓
AES-256-GCM

Do not use a simple hash if the password needs to be recovered for automatic /login.

Server Identification

Credentials should be associated with the correct server.

Do not rely solely on the displayed server name.

Prefer a normalized server identifier such as:

text
hostname + port

Handle:

* Different ports * IP addresses * Domains * Local servers * Server

Kodari AI
KodariOct 4 at 8:44 am 2
AuthyCracker
A client-side Minecraft mod that securely manages and auto-fills /login passwords for cracked/offline-mode servers using AuthMe-like plugins. It detects authentication requirements, prompts to save credentials with AES-256-GCM encryption, and automatically sends the login command only when the server requests it. It never stores or uses passwords for premium/online-mode accounts, ensuring credentials are never exposed in logs, chat, or crash reports. Credentials are keyed by normalized hostname and port for accurate server association.

Plan:

  1. Confirm the 26.2 client chat, connection, screen, and server-address APIs.

  2. Build the client-only mod, encrypted local credential store, and three-choice save prompt.

  3. Keep saving and auto-login gated on an observed authentication prompt; online-mode status itself is not exposed reliably to clients.

Created the AuthyCracker client mod for Fabric 26.2.

  • It watches for server login prompts and only considers /login commands after a prompt on an offline-mode server.

  • It offers Save, Don’t Save, and Never ask again for this server. Saved credentials are keyed by normalized hostname and port.

  • Saved passwords are encrypted with AES-256-GCM using random nonces. Temporary password character arrays are cleared where practical; the mod does not log passwords.

  • Auto-login waits for a detected prompt and is disabled when the connection reports online mode.

Local-key limitation: the generated key is stored separately with owner-only file permissions, but it is not protected by an OS keychain or master password. Someone who can access both files can decrypt the vault.

zeron12

let it ask after use is logined for example in chat it said login successfull or smth like that .. then it should ask...

Kodari AI
KodariOct 4 at 8:58 am 1

Plan:

  1. Keep the entered /login password only as a temporary candidate.

  2. Show the save prompt only after the server sends a successful-login message.

  3. Clear the candidate on explicit failure, disconnect, or any prompt dismissal.

Updated AuthyCracker to keep the entered password temporarily and show the save prompt only after it detects a successful login message. Explicit authentication failures clear the pending password.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
7 606
src/client/java/com/authycracker/client/AuthyCrackerClient.java
package com.authycracker.client;

import java.io.IOException;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Locale;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.message.v1.ClientReceiveMessageEvents;
import net.fabricmc.fabric.api.client.message.v1.ClientSendMessageEvents;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientPacketListener;
import net.minecraft.client.multiplayer.ServerData;
import net.minecraft.client.multiplayer.resolver.ServerAddress;

public final class AuthyCrackerClient implements ClientModInitializer {
	private CredentialStore credentialStore;
	private ClientPacketListener connection;
	private String serverId;
	private boolean onlineMode;
	private boolean authChallengeSeen;
	private boolean loginSent;
	private boolean promptOpen;
	private char[] pendingPassword;
	private String pendingServerId;
	private LoginPromptScreen activePrompt;

	@Override
	public void onInitializeClient() {
		Path storageDirectory = Minecraft.getInstance().gameDirectory.toPath().resolve("config").resolve("authycracker");
		try {
			this.credentialStore = CredentialStore.open(storageDirectory);
		} catch (IOException exception) {
			this.credentialStore = null;
		}

		ClientPlayConnectionEvents.JOIN.register((listener, sender, client) -> {
			this.connection = listener;
			this.serverId = normalizeServerId(client.getCurrentServer());
			this.onlineMode = listener.onlineMode();
			this.authChallengeSeen = false;
			this.loginSent = false;
			this.promptOpen = false;
				this.clearPendingPrompt();
			this.activePrompt = null;
		});

		ClientPlayConnectionEvents.DISCONNECT.register((listener, client) -> {
			if (this.connection != listener) {
				return;
			}
			LoginPromptScreen prompt = this.activePrompt;
			this.clearPendingPrompt();
			this.connection = null;
			this.serverId = null;
			this.onlineMode = false;
			this.authChallengeSeen = false;
			this.loginSent = false;
			if (prompt != null && client.gui.screen() == prompt) {
				client.gui.setScreen(null);
			}
		});

		ClientReceiveMessageEvents.GAME.register((message, overlay) -> this.observeServerMessage(message.getString()));
		ClientSendMessageEvents.ALLOW_COMMAND.register(command -> {
			this.observeCommand(command);
			return true;
		});
	}

	private void observeServerMessage(String message) {
		if (this.connection == null || this.serverId == null || this.onlineMode || this.credentialStore == null) {
			return;
		}
		if (isAuthenticationFailureMessage(message)) {
			this.clearPendingPrompt();
			return;
		}
		if (isAuthenticationPrompt(message)) {
			this.authChallengeSeen = true;
			if (this.loginSent || this.promptOpen) {
				return;
			}
			this.loginSent = true;

			ClientPacketListener currentConnection = this.connection;
			String currentServerId = this.serverId;
			Minecraft client = Minecraft.getInstance();
			client.execute(() -> {
				if (this.connection != currentConnection || this.onlineMode || !this.authChallengeSeen) {
					return;
				}
				try {
					char[] password = this.credentialStore.getPassword(currentServerId);
					if (password == null) {
						return;
					}
					try {
						currentConnection.sendCommand("login " + new String(password));
					} finally {
						Arrays.fill(password, '\0');
					}
				} catch (IOException | java.security.GeneralSecurityException ignored) {
				}
			});
			return;
		}
		if (isAuthenticationSuccessMessage(message)) {
			this.offerSavePrompt();
		}
	}

	private void observeCommand(String command) {
		if (this.connection == null || this.serverId == null || this.onlineMode || !this.authChallengeSeen
				|| this.credentialStore == null || this.promptOpen || this.credentialStore.hasCredential(this.serverId)
				|| this.credentialStore.isNeverAsk(this.serverId)) {
			return;
		}

		int start = 0;
		while (start < command.length() && Character.isWhitespace(command.charAt(start))) {
			start++;
		}
		if (start < command.length() && command.charAt(start) == '/') {
			start++;
		}
		int verbStart = start;
		while (start < command.length() && !Character.isWhitespace(command.charAt(start))) {
			start++;
		}
		if (start - verbStart != 5 || !command.regionMatches(true, verbStart, "login", 0, 5)) {
			return;
		}
		while (start < command.length() && Character.isWhitespace(command.charAt(start))) {
			start++;
		}
		int end = command.length();
		while (end > start && Character.isWhitespace(command.charAt(end - 1))) {
			end--;
		}
		if (start == end) {
			return;
		}

		char[] password = new char[end - start];
		command.getChars(start, end, password, 0);
		if (this.pendingPassword != null) {
			Arrays.fill(this.pendingPassword, '\0');
		}
		this.pendingPassword = password;
		this.pendingServerId = this.serverId;
	}

	private void offerSavePrompt() {
		if (this.pendingPassword == null || this.pendingServerId == null || this.promptOpen || this.onlineMode
				|| this.credentialStore == null || !this.pendingServerId.equals(this.serverId)
				|| this.credentialStore.hasCredential(this.serverId) || this.credentialStore.isNeverAsk(this.serverId)) {
			return;
		}

		this.promptOpen = true;
		ClientPacketListener currentConnection = this.connection;
		String currentServerId = this.serverId;
		Minecraft client = Minecraft.getInstance();
		client.execute(() -> {
			if (this.connection != currentConnection || this.onlineMode || !this.authChallengeSeen
					|| this.pendingPassword == null || !currentServerId.equals(this.pendingServerId)
					|| this.credentialStore == null || this.credentialStore.hasCredential(currentServerId)
					|| this.credentialStore.isNeverAsk(currentServerId)) {
				this.clearPendingPrompt();
				return;
			}
			this.activePrompt = new LoginPromptScreen(
					() -> this.savePendingPassword(currentServerId),
					() -> { },
					() -> this.neverAskForServer(currentServerId),
					this::clearPendingPrompt
			);
			client.gui.setScreen(this.activePrompt);
		});
	}

	private void savePendingPassword(String currentServerId) {
		if (this.credentialStore == null || this.pendingPassword == null) {
			return;
		}
		try {
			this.credentialStore.save(currentServerId, this.pendingPassword);
		} catch (IOException | java.security.GeneralSecurityException ignored) {
		}
	}

	private void neverAskForServer(String currentServerId) {
		if (this.credentialStore == null) {
			return;
		}
		try {
			this.credentialStore.neverAsk(currentServerId);
		} catch (IOException ignored) {