refromage

This commit is contained in:
0x3C50 2022-04-29 00:49:09 +02:00
parent fd9f4f8686
commit b26818608b
7 changed files with 53 additions and 50 deletions

View file

@ -39,20 +39,19 @@ import java.util.function.BiConsumer;
public class OnlineServicesDashboardScreen extends ClientScreen implements FastTickable {
static List<LogsFieldWidget.LogEntry> logs = new CopyOnWriteArrayList<>();
private static OnlineServicesDashboardScreen instance;
long reconnectTime = System.currentTimeMillis();
SimpleWebsocket logsSocket;
AccountList dvw;
private static OnlineServicesDashboardScreen instance;
public static OnlineServicesDashboardScreen getInstance() {
if (instance == null) instance = new OnlineServicesDashboardScreen();
return instance;
}
private OnlineServicesDashboardScreen() {
}
public static OnlineServicesDashboardScreen getInstance() {
if (instance == null) instance = new OnlineServicesDashboardScreen();
return instance;
}
void initSocket() {
if (ShadowAPIWrapper.getAuthKey() != null) {
@ -72,9 +71,9 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
LinkedHashMap<String, String> props = new LinkedHashMap<>();
props.put("Time", sdf.format(pack.data.get("time")));
props.put("Severity", pack.data.get("severity").toString());
logs.add(0, new LogsFieldWidget.LogEntry(props, pack.data.get("message").toString(),switch(pack.data.get("severity").toString()) {
logs.add(0, new LogsFieldWidget.LogEntry(props, pack.data.get("message").toString(), switch (pack.data.get("severity").toString()) {
case "WARNING" -> Color.YELLOW.getRGB();
case "SEVERE" -> new Color(255,50,50).getRGB();
case "SEVERE" -> new Color(255, 50, 50).getRGB();
default -> 0xFFFFFF;
}));
}
@ -90,7 +89,7 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
yO += avw.height + 5;
dvw.add(avw);
}
dvw.add(new RegisterAccountViewer(0,yO,300,30,(s, s2) -> {
dvw.add(new RegisterAccountViewer(0, yO, 300, 30, (s, s2) -> {
if (ShadowAPIWrapper.registerAccount(s, s2)) populateAccountList();
}));
}
@ -151,15 +150,18 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
static class RegisterAccountViewer extends AccountViewerWidget {
BiConsumer<String, String> r;
public RegisterAccountViewer(double x, double y, double width, double height, BiConsumer<String, String> onReg) {
super("","", x, y, width, height, () -> {});
this.r = onReg;
}
RoundTextFieldWidget user, pass;
RoundButton reg;
Element[] getEl() {
return new Element[] {user, pass,reg};
public RegisterAccountViewer(double x, double y, double width, double height, BiConsumer<String, String> onReg) {
super("", "", x, y, width, height, () -> {
});
this.r = onReg;
}
Element[] getEl() {
return new Element[]{user, pass, reg};
}
@Override
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
if (user == null || pass == null || reg == null) initWidgets();
@ -178,7 +180,7 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
public boolean mouseClicked(double mouseX, double mouseY, int button) {
for (Element element : getEl()) {
element.mouseClicked(mouseX, mouseY, button);
}
}
return false;
}
@ -200,12 +202,12 @@ public class OnlineServicesDashboardScreen extends ClientScreen implements FastT
void initWidgets() {
double h = 20;
double pad = (this.height-h)/2d;
double pad = (this.height - h) / 2d;
double regBtnWidth = 60;
double oneWidth = (this.width-regBtnWidth-pad*3)/2d-2.5;
this.user = new RoundTextFieldWidget(x+pad,y+this.height/2d-h/2d,oneWidth,h,"Username");
this.pass = new RoundTextFieldWidget(x+pad+oneWidth+5,y+this.height/2d-h/2d,oneWidth,h,"Password");
this.reg = new RoundButton(RoundButton.STANDARD,x+this.width-pad-regBtnWidth,y+this.height/2d-h/2d,regBtnWidth,h,"Register",()->{
double oneWidth = (this.width - regBtnWidth - pad * 3) / 2d - 2.5;
this.user = new RoundTextFieldWidget(x + pad, y + this.height / 2d - h / 2d, oneWidth, h, "Username");
this.pass = new RoundTextFieldWidget(x + pad + oneWidth + 5, y + this.height / 2d - h / 2d, oneWidth, h, "Password");
this.reg = new RoundButton(RoundButton.STANDARD, x + this.width - pad - regBtnWidth, y + this.height / 2d - h / 2d, regBtnWidth, h, "Register", () -> {
this.r.accept(this.user.get(), this.pass.get());
this.user.set("");
this.pass.set("");

View file

@ -35,10 +35,9 @@ import java.util.Random;
public class ClientCrasher extends Module {
boolean sends = true;
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Offhand).name("Mode").description("How to crash").get());
final DoubleSetting power = this.config.create(new DoubleSetting.Builder(1000).min(5).max(2000).name("Power").description("How much power to crash with").get());
boolean sends = true;
BlockPos selectedbreaker;
public ClientCrasher() {
@ -49,7 +48,7 @@ public class ClientCrasher extends Module {
@EventListener(type = EventType.PACKET_SEND)
void giveAShit(PacketEvent event) {
if (mode.getValue() != Mode.Place) return;
if(!sends) return;
if (!sends) return;
if (!this.isEnabled()) return;
if (!(event.getPacket() instanceof PlayerMoveC2SPacket packet))
return;

View file

@ -53,16 +53,16 @@ public class CraftCrash extends Module {
if (client.currentScreen instanceof CraftingScreen && !isListening) {
ticks++;
int sync = client.player.currentScreenHandler.syncId;
if(ticks % 15 == 0){
if (ticks % 15 == 0) {
Notification.create(1000, "CraftCrash", Notification.Type.SUCCESS, "Disabling stream...");
for(int i = 0; i < 50; i++){
for (int i = 0; i < 50; i++) {
client.player.networkHandler.sendPacket(new CraftRequestC2SPacket(sync, stick, true));
client.player.networkHandler.sendPacket(new CraftRequestC2SPacket(sync, buton, true));
}
}
if(ticks % 75 == 0){
if (ticks % 75 == 0) {
Notification.create(1000, "CraftCrash", Notification.Type.SUCCESS, "Sent Payload!");
for(int i = 0; i < 2000; i++){
for (int i = 0; i < 2000; i++) {
client.player.networkHandler.sendPacket(new CraftRequestC2SPacket(sync, stick, true));
client.player.networkHandler.sendPacket(new CraftRequestC2SPacket(sync, buton, true));
}

View file

@ -4,20 +4,24 @@
package net.shadow.client.feature.module.impl.crash;
import java.util.Random;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.feature.module.Module;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.nbt.*;
import net.minecraft.nbt.NbtByte;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtInt;
import net.minecraft.nbt.NbtList;
import net.minecraft.nbt.NbtString;
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import java.util.Random;
public class SSRFCrash extends Module {
@ -78,7 +82,7 @@ public class SSRFCrash extends Module {
}
private String rndStr(int size) {
StringBuilder buf = new StringBuilder();
String[] chars = new String[]{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};

View file

@ -5,14 +5,13 @@
package net.shadow.client.feature.module.impl.exploit;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket;
import net.minecraft.screen.slot.SlotActionType;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.event.EventListener;
import net.shadow.client.helper.event.EventType;
import net.shadow.client.helper.event.events.PacketEvent;
import net.shadow.client.feature.module.Module;
import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket;
import net.minecraft.screen.slot.SlotActionType;
public class Equipper extends Module {
@ -20,8 +19,8 @@ public class Equipper extends Module {
super("Equipper", "equips anything as armor", ModuleType.EXPLOIT);
}
@EventListener(type=EventType.PACKET_SEND)
void giveAShit(PacketEvent event){
@EventListener(type = EventType.PACKET_SEND)
void giveAShit(PacketEvent event) {
if (event.getPacket() instanceof ClickSlotC2SPacket packet) {
if (packet.getActionType() == SlotActionType.PICKUP && packet.getButton() == 0 && packet.getSlot() >= 5 && packet.getSlot() <= 8) {
int slot = packet.getSlot() - 5;

View file

@ -5,30 +5,28 @@
package net.shadow.client.feature.module.impl.world;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
import net.minecraft.network.packet.c2s.play.ClientStatusC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.event.EventListener;
import net.shadow.client.helper.event.EventType;
import net.shadow.client.helper.event.events.PacketEvent;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.module.Module;
import net.minecraft.client.util.math.MatrixStack;
public class Godmode extends Module {
int ticks;
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Vanilla).name("Mode").description("The mode to get god in").get());
int ticks;
public Godmode() {
super("Godmode", "God mods", ModuleType.WORLD);
}
@EventListener(type=EventType.PACKET_SEND)
void giveAShit(PacketEvent event){
if(event.getPacket() instanceof ClientStatusC2SPacket packet){
if(packet.getMode() == ClientStatusC2SPacket.Mode.PERFORM_RESPAWN){
@EventListener(type = EventType.PACKET_SEND)
void giveAShit(PacketEvent event) {
if (event.getPacket() instanceof ClientStatusC2SPacket packet) {
if (packet.getMode() == ClientStatusC2SPacket.Mode.PERFORM_RESPAWN) {
event.setCancelled(true);
client.setScreen(null);
client.currentScreen = null;
@ -39,7 +37,7 @@ public class Godmode extends Module {
@Override
public void tick() {
if(mode.getValue() == Mode.Matrix){
if (mode.getValue() == Mode.Matrix) {
ticks++;
if (ticks % 10 == 0) {
for (int i = 0; i < 2; i++) {

View file

@ -19,6 +19,7 @@ import java.util.Map;
public class IRCWebSocket extends WebSocketClient {
String authToken;
Runnable onClose;
public IRCWebSocket(URI serverUri, String authToken, Runnable onClose) {
super(serverUri, Map.of("Authorization", authToken));
this.authToken = authToken;