Home›Java›Mods›HWID (Anti-Alts)
HWID (Anti-Alts)
ModsJava

HWID (Anti-Alts)

Java mod listed for Minecraft 1.20–1.21. Downloads from the MC Java Mods app on Android.

by lunofe · on CurseForge

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.21.1–1.21.11 · NeoForge⬇ Download for 1.20.1 · Forge
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

Are you running a server and occasionally meet some players you want to get rid of, but they keep coming back using alt accounts and a VPN? Well, now you've got the chance to identify their accounts based on a hardware ID instead of unreliable IPs, skins or behaviour!


What this mod does

What this mod doesn't do

How to use it then?

Check some example scripts further down below, I don't want to bury the following two points under codeblocks as they're quite important to read.


Privacy

While a hardware ID sounds invasive, it's way less confidental information than an IP address. The hardware ID is being calculated on the client using the SHA-256 algorithm, which is irreversible and therefore gives server operators no information on what hardware is being used. The hardware ID can only be used to tell unique hardware configurations apart.

Limitations


Bash

#!/bin/bash

destination_path="/home/minecraftserver/config/hwid"
for file in "$destination_path"/*
do
    line_count=$(wc -l <"$file")  # Count the number of lines in the file
    if [ "$line_count" -gt 1 ]  # Check if the line count is greater than 1
    then
        echo ""; echo "$(basename "$file")"  # Print an empty line and the filename
        while IFS= read -r line  # Read each line from the file
        do
            uuid=${line}  # Assign the line to the variable 'uuid'
            response=$(curl -s https://sessionserver.mojang.com/session/minecraft/profile/${uuid})  # Send a request to the Mojang API to get the profile information
            name=$(echo "$response" | jq -r '.name')  # Extract the 'name' field from the API response using jq
            echo "${uuid} - ${name}"  # Print the UUID and the corresponding name
        done < "$file"  # Read from the file
    fi
done

Python 3

import os, json, requests

search = ""  # Set the search term, eg. username, UUID or parts of either

for filename in os.listdir("/home/minecraftserver/config/hwid"):  # Iterate over each file in the specified directory
    with open(f"/home/minecraftserver/config/hwid/{filename}", "r") as file:  # Open each file in read mode
        lines = file.readlines()  # Read all lines from the file
        if len(lines) > 1:  # Check if there are more than one line in the file
            result = ""  # Initialize the result string
            for line in lines:
                uuid = line.strip()  # Get the UUID from each line
                response = requests.get(f"https://sessionserver.mojang.com/session/minecraft/profile/{uuid}")  # Send a GET request to Mojang API to get player profile
                name = json.loads(response.text)['name']  # Extract the player name from the response
                result += f"{uuid} - {name}\n"  # Append UUID and name to the result string
            if search in result:  # Check if the search string is present in the result
                print(result)  # Print the result
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more