From 38b6d43976f45e4b499ab8484782d3109c9d6f01 Mon Sep 17 00:00:00 2001 From: Zywl <86253343+opZywl@users.noreply.github.com> Date: Sun, 5 Jan 2025 12:54:32 -0300 Subject: [PATCH 1/3] feat: - Add watchdogMotion to bypass Watchdog anti-cheat. - Add BasicDisabler module to cancel multiple packet types. - Implement NoRotationDisabler to manipulate player rotations. - Introduce intaveFly mode with packet queue management. - Add Debugging configuration for enabling debug messages. - Enhance chat messages for better user feedback when activating/deactivating features. refactor: - Improve packet management by restructuring handlers and adding helper functions. - Refactor combat and watchdog state management for proper resetting and updates. fix: - Ensure states reset correctly on world change to prevent unwanted behaviors. - Improve checkCompass function for case-insensitive and efficient item detection. --- .../module/modules/exploit/Disabler.kt | 238 +++++++++++++++++- 1 file changed, 231 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt index 3e39867d61e..fa64e560a6a 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt @@ -5,12 +5,12 @@ */ package net.ccbluex.liquidbounce.features.module.modules.exploit -import net.ccbluex.liquidbounce.config.boolean -import net.ccbluex.liquidbounce.config.int -import net.ccbluex.liquidbounce.config.text +import net.ccbluex.liquidbounce.config.* import net.ccbluex.liquidbounce.event.* import net.ccbluex.liquidbounce.features.module.Category import net.ccbluex.liquidbounce.features.module.Module +import net.ccbluex.liquidbounce.script.api.global.Chat +import net.ccbluex.liquidbounce.utils.client.ClientUtils.displayChatMessage import net.ccbluex.liquidbounce.utils.client.PacketUtils.sendPacket import net.ccbluex.liquidbounce.utils.client.chat import net.ccbluex.liquidbounce.utils.extensions.isInLiquid @@ -20,12 +20,13 @@ import net.ccbluex.liquidbounce.utils.inventory.InventoryUtils import net.ccbluex.liquidbounce.utils.movement.MovementUtils.airTicks import net.minecraft.init.Items import net.minecraft.item.ItemStack -import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement -import net.minecraft.network.play.client.C0BPacketEntityAction -import net.minecraft.network.play.client.C0FPacketConfirmTransaction +import net.minecraft.network.Packet +import net.minecraft.network.play.INetHandlerPlayClient +import net.minecraft.network.play.client.* import net.minecraft.network.play.server.S07PacketRespawn import net.minecraft.network.play.server.S08PacketPlayerPosLook import net.minecraft.network.play.server.S32PacketConfirmTransaction +import java.util.concurrent.LinkedBlockingQueue object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { val startSprint by boolean("StartSprint", true) @@ -41,12 +42,37 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { val verusCombat by boolean("VerusCombat", false) val onlyCombat by boolean("OnlyCombat", true) { verusCombat } + val intaveFly by boolean("intaveFly", false) + private var shouldDelay = false + private val packets = LinkedBlockingQueue>() + + val noRotationDisabler by boolean("NoRotationDisabler", false) + + val modifyModeValue by choices("Mode", arrayOf("ConvertNull", "Spoof", "Zero", "SpoofZero", "Negative", "OffsetYaw", "Invalid"), "NoRotationDisabler") { noRotationDisabler } + val offsetAmountValue by float("OffsetAmount", 6f, -180f.. 180f) { noRotationDisabler } + + val basicDisabler by boolean("BasicDisabler", false) + + val cancelC00Value by boolean("CancelC00", true) { basicDisabler } + val cancelC0FValue by boolean("CancelC0F", true) { basicDisabler } + val cancelC0AValue by boolean("CancelC0A", true) { basicDisabler } + val cancelC0BValue by boolean("CancelC0B", true) { basicDisabler } + val cancelC07Value by boolean("CancelC07", true) { basicDisabler } + val cancelC13Value by boolean("CancelC13", true) { basicDisabler } + val cancelC03Value by boolean("CancelC03", true) { basicDisabler } + val c03NoMoveValue by boolean("C03-NoMove", true) { basicDisabler } + private val hypixelMotion by boolean("HypixelMotion", false) private val notWhenStarAvailable by boolean("NotWithStar", true) { hypixelMotion } + private val watchdogMotion by boolean("Watchdog Motion", false) + private val wdMode by choices("Game Mode", arrayOf("BW", "SW"), "SW") { watchdogMotion } + val spigotSpam by boolean("SpigotSpam", false) val message by text("Message", "/skill") { spigotSpam } + private val debugValue by boolean("Debug", false) + private var transaction = false var isOnCombat = false @@ -54,6 +80,11 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { private var execute = false private var jump = false + //Watchdog Motion + private var wdDisabled = false + private var wdTestTicks = 0 + private var offGroundTicks = 0 + private val hasStar get() = InventoryUtils.findItem(36, 44, Items.nether_star) != null @@ -61,6 +92,116 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { val player = mc.thePlayer ?: return@handler val packet = event.packet + // Basic Disabler + if (basicDisabler) { + when (packet) { + is C00PacketKeepAlive -> if (cancelC00Value) { + event.cancelEvent() + debugMessage("Cancel C00-KeepAlive") + } + is C0FPacketConfirmTransaction -> if (cancelC0FValue) { + event.cancelEvent() + debugMessage("Cancel C0F-Transaction") + } + is C0APacketAnimation -> if (cancelC0AValue) { + event.cancelEvent() + debugMessage("Cancel C0A-Swing") + } + is C0BPacketEntityAction -> if (cancelC0BValue) { + event.cancelEvent() + debugMessage("Cancel C0B-Action") + } + is C07PacketPlayerDigging -> if (cancelC07Value) { + event.cancelEvent() + debugMessage("Cancel C07-Digging") + } + is C13PacketPlayerAbilities -> if (cancelC13Value) { + event.cancelEvent() + debugMessage("Cancel C13-Abilities") + } + is C03PacketPlayer -> if (cancelC03Value && !(packet is C03PacketPlayer.C04PacketPlayerPosition || packet is C03PacketPlayer.C05PacketPlayerLook || packet is C03PacketPlayer.C06PacketPlayerPosLook)) { + if (c03NoMoveValue && player.isMoving) return@handler + event.cancelEvent() + debugMessage("Cancel C03-Flying") + } + } + } + + // NoRotationDisabler + if (noRotationDisabler && packet is C03PacketPlayer) { + + when (modifyModeValue) { + "ConvertNull" -> { + if (packet.isMoving) { + sendPacket( + C03PacketPlayer.C04PacketPlayerPosition( + packet.x, + packet.y, + packet.z, + packet.onGround + ) + ) + } else { + sendPacket(C03PacketPlayer(packet.onGround)) + } + event.cancelEvent() + } + + "Spoof" -> { + if (packet.getRotating()) { + packet.yaw = player.rotationYaw + packet.pitch = player.rotationPitch + } + } + + "Zero" -> { + if (packet.getRotating()) { + packet.yaw = 0.0f + packet.pitch = 0.0f + } + } + + "SpoofZero" -> { + if (packet.isMoving) { + sendPacket( + C03PacketPlayer.C06PacketPlayerPosLook( + packet.x, + packet.y, + packet.z, + 0.0f, + 0.0f, + packet.onGround + ) + ) + } else { + sendPacket( + C03PacketPlayer.C06PacketPlayerPosLook( + player.posX, + player.posY, + player.posZ, + 0.0f, + 0.0f, + packet.onGround + ) + ) + } + event.cancelEvent() + } + + "Negative" -> { + if (packet.getRotating()) { + packet.yaw = -packet.yaw + packet.pitch = -packet.pitch + } + } + + "OffsetYaw" -> { + if (packet.getRotating()) { + packet.yaw += offsetAmountValue + } + } + } + } /** * Working on Hypixel (Watchdog) * Tested on: play.hypixel.net @@ -84,6 +225,25 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } } + if (watchdogMotion) { + if (packet is S08PacketPlayerPosLook) { + if(wdTestTicks != -1) + wdTestTicks++ + if (wdTestTicks >= 20) { + wdDisabled = false + wdTestTicks = -1 + displayChatMessage("§aSuccessfully Disabled Watchdog. Enjoy lowhopping yay") + } else { + player.motionY = 0.0 + player.motionZ = 0.0 + player.motionX = 0.0 + } + if (wdDisabled) { + displayChatMessage("§cDon't Move! Disabling Motion Checks") + } + } + } + if (grimPlace) { if (packet is C08PacketPlayerBlockPlacement && packet.placedBlockDirection in 0..5) { event.cancelEvent() @@ -104,6 +264,20 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } } + if (intaveFly) { + if (packet is S08PacketPlayerPosLook) { + if (player.capabilities.isFlying) { + shouldDelay = true + displayChatMessage("§cStart Canceling IntaveFly") + } + } + + if (packet is S32PacketConfirmTransaction && shouldDelay) { + event.cancelEvent() + packets.add(packet as Packet) + } + } + if (verusCombat) { if (player.ticksExisted <= 20) { isOnCombat = false @@ -163,6 +337,22 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } player.setVelocity(0.0, 0.0, 0.0) } + + if (watchdogMotion) { + if (!checkCompass()) { + if (player.onGround && jump) { + jump = false + wdDisabled = true + player.jump() + } else if (wdTestTicks != -1 && wdDisabled && (wdMode.equals("SW") && offGroundTicks >= 3 || wdMode.equals("BW") && offGroundTicks >= 10)) { + if (offGroundTicks % 2 == 0) { + setRotation(floatArrayOf((player.rotationYaw - 10 + (Math.random() - 0.5) * 3).toFloat(), player.rotationPitch)) + event.x += 0.095 + Math.random() / 100 + } + stop(player) + } + } + } } val onUpdate = handler { @@ -201,6 +391,27 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } } } + if(!player.onGround){ + offGroundTicks++ + } else { + offGroundTicks = 0 + } + } + + fun debugMessage(str: String) { + if (debugValue) { + Chat.print("§f$str") + } + } + private fun stop(player: net.minecraft.client.entity.EntityPlayerSP) { + player.motionX = 0.0 + player.motionY = 0.0 + player.motionZ = 0.0 + } + private fun setRotation(rotation: FloatArray) { + val player = mc.thePlayer ?: return + player.rotationYaw = rotation[0] + player.rotationPitch = rotation[1] } val onAttack = handler { @@ -208,6 +419,19 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } val onWorld = handler { + wdDisabled = false + jump = true + wdTestTicks = 0 + offGroundTicks = 0 isOnCombat = false } -} + fun checkCompass(): Boolean { + for (i in 0..8) { + val stackInSlot = mc.thePlayer.inventory.getStackInSlot(i) + if (stackInSlot != null && stackInSlot.unlocalizedName.toLowerCase().contains("compass")) { + return true + } + } + return false + } +} \ No newline at end of file From 008be1b058c1c29569c4983fa6febd15e3934673 Mon Sep 17 00:00:00 2001 From: Zywl <86253343+opZywl@users.noreply.github.com> Date: Sun, 5 Jan 2025 13:05:45 -0300 Subject: [PATCH 2/3] feat: watchdog inventory --- .../module/modules/exploit/Disabler.kt | 47 ++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt index fa64e560a6a..035a617462c 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt @@ -27,6 +27,8 @@ import net.minecraft.network.play.server.S07PacketRespawn import net.minecraft.network.play.server.S08PacketPlayerPosLook import net.minecraft.network.play.server.S32PacketConfirmTransaction import java.util.concurrent.LinkedBlockingQueue +import net.minecraft.client.gui.inventory.GuiInventory +import net.minecraft.potion.Potion object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { val startSprint by boolean("StartSprint", true) @@ -65,9 +67,13 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { private val hypixelMotion by boolean("HypixelMotion", false) private val notWhenStarAvailable by boolean("NotWithStar", true) { hypixelMotion } + // Watchdog Motion private val watchdogMotion by boolean("Watchdog Motion", false) private val wdMode by choices("Game Mode", arrayOf("BW", "SW"), "SW") { watchdogMotion } + // Watchdog Inventory + private val watchdogInventory by boolean("Watchdog Inventory", false) + val spigotSpam by boolean("SpigotSpam", false) val message by text("Message", "/skill") { spigotSpam } @@ -85,6 +91,10 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { private var wdTestTicks = 0 private var offGroundTicks = 0 + //Watchdog Inventory + private var c16 = false + private var c0d = false + private val hasStar get() = InventoryUtils.findItem(36, 44, Items.nether_star) != null @@ -225,6 +235,7 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } } + // Watchdog Motion if (watchdogMotion) { if (packet is S08PacketPlayerPosLook) { if(wdTestTicks != -1) @@ -244,6 +255,23 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } } + // Watchdog Inventory + if(watchdogInventory){ + if (packet is C16PacketClientStatus) { + if (c16) { + event.cancelEvent() + } + c16 = true + } + + if (packet is C0DPacketCloseWindow) { + if (c0d) { + event.cancelEvent() + } + c0d = true + } + } + if (grimPlace) { if (packet is C08PacketPlayerBlockPlacement && packet.placedBlockDirection in 0..5) { event.cancelEvent() @@ -338,13 +366,15 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { player.setVelocity(0.0, 0.0, 0.0) } + + // Watchdog Motion if (watchdogMotion) { if (!checkCompass()) { if (player.onGround && jump) { jump = false wdDisabled = true player.jump() - } else if (wdTestTicks != -1 && wdDisabled && (wdMode.equals("SW") && offGroundTicks >= 3 || wdMode.equals("BW") && offGroundTicks >= 10)) { + } else if (wdTestTicks != -1 && wdDisabled && (wdMode == "SW" && offGroundTicks >= 3 || wdMode == "BW" && offGroundTicks >= 10)) { if (offGroundTicks % 2 == 0) { setRotation(floatArrayOf((player.rotationYaw - 10 + (Math.random() - 0.5) * 3).toFloat(), player.rotationPitch)) event.x += 0.095 + Math.random() / 100 @@ -364,6 +394,19 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } } + // Watchdog Inventory + if(watchdogInventory){ + c16 = false + c0d = false + if (mc.currentScreen is GuiInventory) { + if (player.ticksExisted % (if(player.isPotionActive(Potion.moveSpeed)) 3 else 4) == 0) { + sendPacket(C0DPacketCloseWindow(),false) + } else if (player.ticksExisted % (if(player.isPotionActive(Potion.moveSpeed)) 3 else 4) == 1) { + sendPacket(C16PacketClientStatus(C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT),false) + } + } + } + if (verusFly) { if (!isOnCombat && !player.isDead) { val pos = player.position.add(0, if (player.posY > 0) -255 else 255, 0) ?: return@handler @@ -434,4 +477,4 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } return false } -} \ No newline at end of file +} From 26f5ad1e2e7c9f22ce87277237912c93d9eca440 Mon Sep 17 00:00:00 2001 From: Eclipses <99494277+EclipsesDev@users.noreply.github.com> Date: Thu, 9 Jan 2025 19:20:33 +0700 Subject: [PATCH 3/3] small cleanup & added notes for @opZywl --- .../module/modules/exploit/Disabler.kt | 147 ++++++++++-------- 1 file changed, 79 insertions(+), 68 deletions(-) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt index 035a617462c..41ce98a081a 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt @@ -68,11 +68,12 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { private val notWhenStarAvailable by boolean("NotWithStar", true) { hypixelMotion } // Watchdog Motion - private val watchdogMotion by boolean("Watchdog Motion", false) - private val wdMode by choices("Game Mode", arrayOf("BW", "SW"), "SW") { watchdogMotion } + // TODO: @opZywl Remove/Modify this + //private val watchdogMotion by boolean("WatchdogMotion", false) + //private val wdMode by choices("Game Mode", arrayOf("BW", "SW"), "SW") { watchdogMotion } // Watchdog Inventory - private val watchdogInventory by boolean("Watchdog Inventory", false) + private val watchdogInventory by boolean("WatchdogInventory", false) val spigotSpam by boolean("SpigotSpam", false) val message by text("Message", "/skill") { spigotSpam } @@ -212,6 +213,7 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } } } + /** * Working on Hypixel (Watchdog) * Tested on: play.hypixel.net @@ -236,27 +238,28 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } // Watchdog Motion - if (watchdogMotion) { - if (packet is S08PacketPlayerPosLook) { - if(wdTestTicks != -1) - wdTestTicks++ - if (wdTestTicks >= 20) { - wdDisabled = false - wdTestTicks = -1 - displayChatMessage("§aSuccessfully Disabled Watchdog. Enjoy lowhopping yay") - } else { - player.motionY = 0.0 - player.motionZ = 0.0 - player.motionX = 0.0 - } - if (wdDisabled) { - displayChatMessage("§cDon't Move! Disabling Motion Checks") - } - } - } + // TODO: @opZywl remove this and just modify current hypixelmotion disabler +// if (watchdogMotion) { +// if (packet is S08PacketPlayerPosLook) { +// if(wdTestTicks != -1) +// wdTestTicks++ +// if (wdTestTicks >= 20) { +// wdDisabled = false +// wdTestTicks = -1 +// displayChatMessage("§aSuccessfully Disabled Watchdog. Enjoy lowhopping yay") +// } else { +// player.motionY = 0.0 +// player.motionZ = 0.0 +// player.motionX = 0.0 +// } +// if (wdDisabled) { +// displayChatMessage("§cDon't Move! Disabling Motion Checks") +// } +// } +// } // Watchdog Inventory - if(watchdogInventory){ + if (watchdogInventory) { if (packet is C16PacketClientStatus) { if (c16) { event.cancelEvent() @@ -366,23 +369,23 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { player.setVelocity(0.0, 0.0, 0.0) } - // Watchdog Motion - if (watchdogMotion) { - if (!checkCompass()) { - if (player.onGround && jump) { - jump = false - wdDisabled = true - player.jump() - } else if (wdTestTicks != -1 && wdDisabled && (wdMode == "SW" && offGroundTicks >= 3 || wdMode == "BW" && offGroundTicks >= 10)) { - if (offGroundTicks % 2 == 0) { - setRotation(floatArrayOf((player.rotationYaw - 10 + (Math.random() - 0.5) * 3).toFloat(), player.rotationPitch)) - event.x += 0.095 + Math.random() / 100 - } - stop(player) - } - } - } + // TODO: Do the same thing like line 241 +// if (watchdogMotion) { +// if (!checkCompass()) { +// if (player.onGround && jump) { +// jump = false +// wdDisabled = true +// player.jump() +// } else if (wdTestTicks != -1 && wdDisabled && (wdMode == "SW" && offGroundTicks >= 3 || wdMode == "BW" && offGroundTicks >= 10)) { +// if (offGroundTicks % 2 == 0) { +// setRotation(floatArrayOf((player.rotationYaw - 10 + (Math.random() - 0.5) * 3).toFloat(), player.rotationPitch)) +// event.x += 0.095 + Math.random() / 100 +// } +// stop(player) +// } +// } +// } } val onUpdate = handler { @@ -395,7 +398,7 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } // Watchdog Inventory - if(watchdogInventory){ + if (watchdogInventory) { c16 = false c0d = false if (mc.currentScreen is GuiInventory) { @@ -434,47 +437,55 @@ object Disabler : Module("Disabler", Category.EXPLOIT, hideModule = false) { } } } - if(!player.onGround){ - offGroundTicks++ - } else { - offGroundTicks = 0 - } + // TODO: @opZywl use airTicks in MovementUtils +// if(!player.onGround){ +// offGroundTicks++ +// } else { +// offGroundTicks = 0 +// } } - fun debugMessage(str: String) { + private fun debugMessage(str: String) { if (debugValue) { Chat.print("§f$str") } } - private fun stop(player: net.minecraft.client.entity.EntityPlayerSP) { - player.motionX = 0.0 - player.motionY = 0.0 - player.motionZ = 0.0 - } - private fun setRotation(rotation: FloatArray) { - val player = mc.thePlayer ?: return - player.rotationYaw = rotation[0] - player.rotationPitch = rotation[1] - } + + // TODO: @opZywl remove this, and use `player.stop()` +// private fun stop(player: net.minecraft.client.entity.EntityPlayerSP) { +// player.motionX = 0.0 +// player.motionY = 0.0 +// player.motionZ = 0.0 +// } + + // TODO: @opZywl remove this, if its needed then just use RotationUtils or smth +// private fun setRotation(rotation: FloatArray) { +// val player = mc.thePlayer ?: return +// player.rotationYaw = rotation[0] +// player.rotationPitch = rotation[1] +// } val onAttack = handler { isOnCombat = true } val onWorld = handler { - wdDisabled = false - jump = true - wdTestTicks = 0 - offGroundTicks = 0 + // TODO: @opZywl remove this/modify +// wdDisabled = false +// jump = true +// wdTestTicks = 0 +// offGroundTicks = 0 isOnCombat = false } - fun checkCompass(): Boolean { - for (i in 0..8) { - val stackInSlot = mc.thePlayer.inventory.getStackInSlot(i) - if (stackInSlot != null && stackInSlot.unlocalizedName.toLowerCase().contains("compass")) { - return true - } - } - return false - } + + // TODO: Zywl use InventoryUtils +// fun checkCompass(): Boolean { +// for (i in 0..8) { +// val stackInSlot = mc.thePlayer.inventory.getStackInSlot(i) +// if (stackInSlot != null && stackInSlot.unlocalizedName.toLowerCase().contains("compass")) { +// return true +// } +// } +// return false +// } }