PingSpoof module

PingSpoof: Minecraft 26.3 cheat module, full source for every implementation (1 client: LiquidBounce (Kotlin)).

1 implementationEXPLOIT

Clients with this module

Full module source: 1 implementation

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

LiquidBounce (Kotlin)EXPLOITsrc/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/exploit/ModulePingSpoof.ktKotlin · 77 lines · 2.9 KB

Spoofs your ping to a specified value.

SettingsDelay
ModulePingSpoof.ktKotlin · Minecraft 26.2 · 77 lines · 2.9 KB · complete file, verbatimOriginal ↗
1
/*
2
 * This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
3
 *
4
 * Copyright (c) 2015 - 2026 CCBlueX
5
 *
6
 * LiquidBounce is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * LiquidBounce is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
18
 */
19
package net.ccbluex.liquidbounce.features.module.modules.exploit
20
21
import net.ccbluex.liquidbounce.event.events.BlinkPacketEvent
22
import net.ccbluex.liquidbounce.event.events.TickPacketProcessEvent
23
import net.ccbluex.liquidbounce.event.events.TransferOrigin
24
import net.ccbluex.liquidbounce.event.handler
25
import net.ccbluex.liquidbounce.features.blink.BlinkManager
26
import net.ccbluex.liquidbounce.features.module.ClientModule
27
import net.ccbluex.liquidbounce.features.module.ModuleCategories
28
import net.ccbluex.liquidbounce.utils.client.chat
29
import net.ccbluex.liquidbounce.utils.client.markAsError
30
import net.minecraft.network.protocol.common.ClientboundKeepAlivePacket
31
import net.minecraft.network.protocol.common.ClientboundPingPacket
32
33
/**
34
 * PingSpoof module
35
 *
36
 * Spoofs your ping to a specified value.
37
 */
38
39
object ModulePingSpoof : ClientModule("PingSpoof", ModuleCategories.EXPLOIT) {
40
41
    private val delay by int("Delay", 500, 0..25000, "ms")
42
43
    @Suppress("unused")
44
    private val fakeLagHandler = handler<BlinkPacketEvent> { event ->
45
        if (player.isDeadOrDying || event.origin != TransferOrigin.INCOMING) {
46
            return@handler
47
        }
48
49
        val packet = event.packet
50
51
        event.action = if (packet is ClientboundKeepAlivePacket || packet is ClientboundPingPacket) {
52
            BlinkManager.Action.QUEUE
53
        } else {
54
            BlinkManager.Action.PASS
55
        }
56
    }
57
58
    @Suppress("unused")
59
    private val tickHandler = handler<TickPacketProcessEvent> {
60
        if (mc.hasSingleplayerServer()) {
61
            chat(markAsError(message("cantEnableInSingleplayer")))
62
            enabled = false
63
            return@handler
64
        }
65
66
        // Flush when the delay is reached
67
        // This will also flush packets that are not KeepAliveS2CPacket or CommonPingS2CPacket,
68
        // in order to keep packet order intact. However, since we only flush on the received side,
69
        // this should not be a problem.
70
        val currentTime = System.currentTimeMillis()
71
        BlinkManager.flush { snapshot ->
72
            snapshot.origin == TransferOrigin.INCOMING && currentTime - snapshot.timestamp >= delay
73
        }
74
    }
75
76
}
77