-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Target Strafe new modes back AuthBypass Module notifyLast in AntiVanish Module correction of memory leak
- Loading branch information
Showing
33 changed files
with
2,145 additions
and
436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
509 changes: 491 additions & 18 deletions
509
src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/HUD.kt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
344 changes: 308 additions & 36 deletions
344
src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/TargetStrafe.kt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
176 changes: 176 additions & 0 deletions
176
src/main/java/net/ccbluex/liquidbounce/features/module/modules/other/AuthBypass.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
/* | ||
* FDPClient Hacked Client | ||
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce. | ||
* https://github.com/SkidderMC/FDPClient/ | ||
*/ | ||
package net.ccbluex.liquidbounce.features.module.modules.other | ||
|
||
import com.google.gson.JsonParser | ||
import net.ccbluex.liquidbounce.FDPClient | ||
|
||
import net.ccbluex.liquidbounce.event.EventTarget | ||
import net.ccbluex.liquidbounce.event.PacketEvent | ||
import net.ccbluex.liquidbounce.event.UpdateEvent | ||
import net.ccbluex.liquidbounce.value.IntegerValue | ||
import net.ccbluex.liquidbounce.features.module.Module | ||
import net.ccbluex.liquidbounce.features.module.ModuleCategory | ||
import net.ccbluex.liquidbounce.features.module.ModuleInfo | ||
import net.ccbluex.liquidbounce.ui.client.hud.element.elements.Notification | ||
import net.ccbluex.liquidbounce.ui.client.hud.element.elements.NotifyType | ||
|
||
import net.ccbluex.liquidbounce.utils.misc.RandomUtils | ||
import net.ccbluex.liquidbounce.utils.timer.MSTimer | ||
import net.minecraft.item.* | ||
import net.minecraft.nbt.NBTTagCompound | ||
import net.minecraft.network.Packet | ||
import net.minecraft.network.play.INetHandlerPlayServer | ||
import net.minecraft.network.play.client.C0EPacketClickWindow | ||
import net.minecraft.network.play.server.S2DPacketOpenWindow | ||
import net.minecraft.network.play.server.S2FPacketSetSlot | ||
import org.apache.commons.io.IOUtils | ||
import java.util.* | ||
|
||
@ModuleInfo(name = "AuthBypass", description = "Bypass auth when join server.", category = ModuleCategory.OTHER) | ||
class AuthBypass : Module() { | ||
private val delayValue = IntegerValue("Delay", 1500, 100, 5000, "ms") | ||
|
||
private var skull : String? = null | ||
private var type = "none" | ||
private val packets = ArrayList<Packet<INetHandlerPlayServer>>() | ||
private val clickedSlot = ArrayList<Int>() | ||
private val timer = MSTimer() | ||
private val jsonParser = JsonParser() | ||
|
||
private val brLangMap = HashMap<String, String>() | ||
|
||
@EventTarget | ||
fun onUpdate(event: UpdateEvent) { | ||
if (packets.isNotEmpty() && timer.hasTimePassed(delayValue.get().toLong())) { | ||
for (packet in packets) { | ||
mc.netHandler.addToSendQueue(packet) | ||
} | ||
packets.clear() | ||
FDPClient.hud.addNotification(Notification(name,"Authentication bypassed.", NotifyType.INFO)) | ||
} | ||
} | ||
|
||
override fun onEnable() { | ||
skull = null | ||
type = "none" | ||
packets.clear() | ||
clickedSlot.clear() | ||
|
||
//load locale async | ||
Thread { | ||
val localeJson = JsonParser().parse(IOUtils.toString(AuthBypass::class.java.classLoader.getResourceAsStream("br_items.json"), "utf-8")).asJsonObject | ||
|
||
brLangMap.clear() | ||
for ((key,element) in localeJson.entrySet()) { | ||
brLangMap["item.$key"] = element.asString.lowercase(Locale.getDefault()) | ||
} | ||
}.start() | ||
} | ||
|
||
@EventTarget | ||
fun onPacket(event: PacketEvent) { | ||
val packet = event.packet | ||
if (packet is S2FPacketSetSlot) { | ||
val slot = packet.func_149173_d() | ||
val windowId = packet.func_149175_c() | ||
val item = packet.func_149174_e() | ||
if (windowId == 0 || item == null || type == "none" || clickedSlot.contains(slot)) { | ||
return | ||
} | ||
val itemName = item.unlocalizedName | ||
|
||
when (type.lowercase(Locale.getDefault())) { | ||
"skull" -> { | ||
if (itemName.contains("item.skull.char", ignoreCase = true)) { | ||
val nbt = item.tagCompound ?: return | ||
// val uuid=nbt.get<CompoundTag>("SkullOwner").get<CompoundTag>("Properties").get<ListTag>("textures").get<CompoundTag>(0).get<StringTag>("Value").value | ||
val data = process(nbt.getCompoundTag("SkullOwner").getCompoundTag("Properties") | ||
.getTagList("textures", NBTTagCompound.NBT_TYPES.indexOf("COMPOUND")) | ||
.getCompoundTagAt(0).getString("Value")) | ||
if (skull== null) { | ||
skull = data | ||
} else if (skull != data) { | ||
skull = null | ||
timer.reset() | ||
click(windowId, slot, item) | ||
} | ||
} | ||
} | ||
|
||
// special rules lol | ||
"enchada" -> { // select all | ||
click(windowId, slot, item) | ||
} | ||
|
||
"cabeça" -> { // skulls | ||
if (item.item is ItemSkull) { | ||
click(windowId, slot, item) | ||
} | ||
} | ||
|
||
"ferramenta" -> { // tools | ||
if (item.item is ItemTool) { | ||
click(windowId, slot, item) | ||
} | ||
} | ||
|
||
"comida" -> { // foods | ||
if (item.item is ItemFood) { | ||
click(windowId, slot, item) | ||
} | ||
} | ||
|
||
// the new item check in redesky | ||
else -> { | ||
if (getItemLocalName(item).contains(type)) { | ||
click(windowId, slot, item) | ||
} | ||
} | ||
} | ||
} | ||
//silent auth xd | ||
if (packet is S2DPacketOpenWindow) { | ||
val windowName = packet.windowTitle.unformattedText | ||
if (packet.slotCount == 27 && packet.guiId.contains("container", ignoreCase = true) | ||
&& windowName.startsWith("Clique", ignoreCase = true)) { | ||
type = when { | ||
windowName.contains("bloco", ignoreCase = true) -> "skull" | ||
else -> { | ||
val splited = windowName.split(" ") | ||
var str = splited[splited.size - 1].replace(".", "").lowercase(Locale.getDefault()) | ||
if (str.endsWith("s")) { | ||
str = str.substring(0, str.length - 1) | ||
} | ||
str | ||
} | ||
} | ||
packets.clear() | ||
clickedSlot.clear() | ||
event.cancelEvent() | ||
} else { | ||
type = "none" | ||
} | ||
} | ||
} | ||
|
||
private fun click(windowId: Int, slot: Int, item: ItemStack) { | ||
clickedSlot.add(slot) | ||
packets.add(C0EPacketClickWindow(windowId, slot, 0, 0, item, RandomUtils.nextInt(114, 514).toShort())) | ||
} | ||
|
||
private fun getItemLocalName(item: ItemStack): String { | ||
return brLangMap[item.unlocalizedName] ?: "null" | ||
} | ||
|
||
private fun process(data: String):String { | ||
val jsonObject = jsonParser.parse(String(Base64.getDecoder().decode(data))).asJsonObject | ||
return jsonObject | ||
.getAsJsonObject("textures") | ||
.getAsJsonObject("SKIN") | ||
.get("url").asString | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.