upd, start working on new LO join challenge

This commit is contained in:
core 2023-07-15 16:50:46 -04:00
parent 71f1278446
commit 92238ea3bb
Signed by: core
GPG Key ID: FDBF740DADDCEECF
8 changed files with 138 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import dev.coredoes.coreclient.gui.Category;
import dev.coredoes.coreclient.gui.ClickGUI;
import dev.coredoes.coreclient.gui.module.*;
import dev.coredoes.coreclient.module.bypass.BotMovement;
import dev.coredoes.coreclient.module.bypass.PacketLogger;
import meteordevelopment.orbit.EventBus;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
@ -46,6 +47,8 @@ public class CoreClient implements ClientModInitializer {
Category.BYPASS.modules.add(new BotMovement());
Category.MISCELLANEOUS.modules.add(new PacketLogger());
LOGGER.info("[Stage 4/4: GuiEventInit] Registering GUI events");
ClientTickEvents.END_CLIENT_TICK.register(client -> {

View File

@ -0,0 +1,11 @@
package dev.coredoes.coreclient.exploit;
import net.minecraft.client.MinecraftClient;
import net.minecraft.screen.slot.SlotActionType;
public class Void {
public static void voidSlot(int syncId, int slot) {
assert MinecraftClient.getInstance().interactionManager != null;
MinecraftClient.getInstance().interactionManager.clickSlot(syncId, slot, 120, SlotActionType.SWAP, MinecraftClient.getInstance().player);
}
}

View File

@ -35,7 +35,6 @@ public class LogoModule extends Module {
public void render (Context context) {
position = new Point(MinecraftClient.getInstance().getWindow().getWidth() / 2 - 32, MinecraftClient.getInstance().getWindow().getHeight() / 2 - 29);
super.render(context);
CoreClient.LOGGER.info("render pos " + position.toString() + " from " + MinecraftClient.getInstance().getWindow().getWidth());
context.getInterface().drawImage(context.getRect(),rotation.getValue(),parity.getValue(),image,color.getValue());
}

View File

@ -11,7 +11,8 @@ import com.lukflug.panelstudio.setting.IModule;
import com.lukflug.panelstudio.setting.ISetting;
public class Module implements IModule {
public final String displayName,description;
public String displayName;
public final String description;
public final IBoolean visible;
public final List<Setting<?>> settings=new ArrayList<Setting<?>>();
public final boolean toggleable;

View File

@ -0,0 +1,49 @@
package dev.coredoes.coreclient.mixin;
import dev.coredoes.coreclient.CoreClient;
import dev.coredoes.coreclient.event.ConnectEvent;
import dev.coredoes.coreclient.event.DisconnectEvent;
import dev.coredoes.coreclient.event.PacketEvent;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.listener.PacketListener;
import net.minecraft.network.packet.Packet;
import net.minecraft.text.Text;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.net.InetSocketAddress;
@Mixin(ClientConnection.class)
public class ClientConnectionMixin {
@Inject(method = "handlePacket", at = @At("HEAD"), cancellable = true)
private static <T extends PacketListener> void onHandlePacket(Packet<T> packet, PacketListener listener, CallbackInfo info) {
if (CoreClient.eventBus.post(PacketEvent.Receive.get(packet)).isCancelled()) info.cancel();
}
@Inject(method = "send(Lnet/minecraft/network/packet/Packet;)V", at = @At("HEAD"), cancellable = true)
private void onSendPacket(Packet<?> packet, CallbackInfo info) {
if (CoreClient.eventBus.post(PacketEvent.Send.get(packet)).isCancelled()) {
// we should cancel this packet
info.cancel();
CoreClient.LOGGER.info("Outgoing packet cancelled");
}
}
@Inject(method = "send(Lnet/minecraft/network/packet/Packet;)V", at = @At("TAIL"))
private void onSentPacket(Packet<?> packet, CallbackInfo info) {
CoreClient.eventBus.post(PacketEvent.Sent.get(packet));
}
@Inject(method = "disconnect", at = @At("HEAD"))
private void disconnect(Text disconnectReason, CallbackInfo ci) {
CoreClient.eventBus.post(DisconnectEvent.get());
}
@Inject(method = "connect", at = @At("HEAD"))
private static void onConnect(InetSocketAddress address, boolean useEpoll, CallbackInfoReturnable<ClientConnection> info) {
CoreClient.eventBus.post(ConnectEvent.get());
}
}

View File

@ -0,0 +1,40 @@
package dev.coredoes.coreclient.module.bypass;
import com.lukflug.panelstudio.base.IBoolean;
import com.lukflug.panelstudio.base.IToggleable;
import dev.coredoes.coreclient.CoreClient;
import dev.coredoes.coreclient.gui.module.Module;
import meteordevelopment.orbit.EventHandler;
public class VoidInventory extends Module {
private static VoidInventory instance;
private boolean enabled=false;
public VoidInventory() {
super("VoidInventory", "Delete every item in your inventory", () -> true, true, false);
CoreClient.eventBus.subscribe(this);
instance = this;
}
public static VoidInventory getInstance() {
return instance;
}
@Override
public IToggleable isEnabled() {
return new IToggleable() {
@Override
public boolean isOn() {
return enabled;
}
@Override
public void toggle() {
displayName = "Are you sure? (click again to confirm)";
}
};
}
}

View File

@ -0,0 +1,31 @@
package dev.coredoes.coreclient.module.bypass;
import com.lukflug.panelstudio.base.IBoolean;
import dev.coredoes.coreclient.CoreClient;
import dev.coredoes.coreclient.event.ConnectEvent;
import dev.coredoes.coreclient.event.PacketEvent;
import dev.coredoes.coreclient.gui.module.Module;
import meteordevelopment.orbit.EventHandler;
public class PacketLogger extends Module {
private static PacketLogger instance;
public PacketLogger() {
super("PacketLogger", "Log all recieved packets to console", () -> true, true, false);
CoreClient.eventBus.subscribe(this);
instance = this;
}
@EventHandler
public void onPacketRecieved(PacketEvent.Receive e) {
if (isEnabled().isOn()) {
CoreClient.LOGGER.debug("pkt", e.packet);
}
}
public static PacketLogger getInstance() {
return instance;
}
}

View File

@ -6,7 +6,8 @@
"client": [
"PlayerMoveC2SPacketFullMixin",
"PlayerMoveC2SPacketLookMixin",
"PlayerMoveC2SPacketOnGroundMixin"
"PlayerMoveC2SPacketOnGroundMixin",
"ClientConnectionMixin"
],
"injectors": {
"defaultRequire": 1