Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BungeeCord Spoof Module #4819

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
* Copyright (c) Meteor Development.
*/

package meteordevelopment.meteorclient.mixin;

import com.google.common.base.Charsets;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.misc.BungeeCordSpoof;
import net.minecraft.client.MinecraftClient;
import net.minecraft.network.packet.c2s.handshake.ConnectionIntent;
import net.minecraft.network.packet.c2s.handshake.HandshakeC2SPacket;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import java.util.UUID;

@Mixin(HandshakeC2SPacket.class)
public class HandshakeC2SPacketMixin {
@Mutable
@Shadow
@Final
private String address;

@Inject(method = "<init>(ILjava/lang/String;ILnet/minecraft/network/packet/c2s/handshake/ConnectionIntent;)V", at = @At("TAIL"))
public void init(int protocolVersion, String address, int port, ConnectionIntent intendedState, CallbackInfo ci) {
if (Modules.get().isActive(BungeeCordSpoof.class) && intendedState == ConnectionIntent.LOGIN) {
BungeeCordSpoof bungeeCordSpoofModule = Modules.get().get(BungeeCordSpoof.class);

// Obtain UUID to send
String uuid;
if (!bungeeCordSpoofModule.spoofedUuid.get().isEmpty()) {
uuid = bungeeCordSpoofModule.spoofedUuid.get();
} else {
UUID currentUuid = MinecraftClient.getInstance().getSession().getUuidOrNull();
if (currentUuid == null) {
// Cracked account
currentUuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + MinecraftClient.getInstance().getSession().getUsername()).getBytes(Charsets.UTF_8));
}

// UUID must be without dashes
uuid = currentUuid.toString().replace("-", "");
}

// hostName \00 spoofed ip \00 spoofed uuid (\00 optional skin)
this.address = address + "\00" + bungeeCordSpoofModule.spoofedIp.get() + "\00" + uuid;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ private void initMisc() {
add(new Spam());
add(new ServerSpoof());
add(new InventoryTweaks());
add(new BungeeCordSpoof());
}

public static class ModuleRegistry extends SimpleRegistry<Module> {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
* Copyright (c) Meteor Development.
*/

package meteordevelopment.meteorclient.systems.modules.misc;

import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.settings.StringSetting;
import meteordevelopment.meteorclient.systems.modules.Categories;
import meteordevelopment.meteorclient.systems.modules.Module;

public class BungeeCordSpoof extends Module {
private final SettingGroup sgGeneral = settings.getDefaultGroup();

public final Setting<String> spoofedIp = sgGeneral.add(new StringSetting.Builder()
.name("spoofed-ip")
.description("The IP to spoof. Recommended to change it to something not suspicious")
.defaultValue("127.0.0.1")
.build()
);

public final Setting<String> spoofedUuid = sgGeneral.add(new StringSetting.Builder()
.name("spoofed-uuid")
.description("The UUID to spoof. If empty then it uses UUID from your account or offline uuid if it is cracked account.")
.defaultValue("")
.filter((text, c) -> {
if (text.length() > 32) return false;
// UUID must be without dashes
if (c == '-') return false;
return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f');
})
.build()
);

public BungeeCordSpoof() {
super(Categories.Misc, "bungeeCord-spoof",
"This module allows you to connect to backend servers that use BungeeCord (with 'bungeecord: true' enabled in spigot.yml). " +
"Additionally, it allows you to spoof your IP and UUID.");
this.runInMainMenu = true;
}
}
3 changes: 2 additions & 1 deletion src/main/resources/meteor-client.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@
"WorldChunkMixin",
"WorldRendererAccessor",
"WorldRendererMixin",
"YggdrasilMinecraftSessionServiceAccessor"
"YggdrasilMinecraftSessionServiceAccessor",
"HandshakeC2SPacketMixin"
],
"injectors": {
"defaultRequire": 1
Expand Down
Loading