Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Z4nzu
GitHub Repository: Z4nzu/hackingtool
Path: blob/master/hackingtool.py
1756 views
1
#!/usr/bin/env python3
2
# Version 1.1.0 (rich UI - purple theme)
3
import os
4
import sys
5
import webbrowser
6
from platform import system
7
from time import sleep
8
9
from rich.console import Console
10
from rich.panel import Panel
11
from rich.table import Table
12
from rich.prompt import Prompt, IntPrompt, Confirm
13
from rich.align import Align
14
from rich.text import Text
15
from rich import box
16
from rich.columns import Columns
17
from rich.rule import Rule
18
from rich.padding import Padding
19
20
from core import HackingToolsCollection
21
from tools.anonsurf import AnonSurfTools
22
from tools.ddos import DDOSTools
23
from tools.exploit_frameworks import ExploitFrameworkTools
24
from tools.forensic_tools import ForensicTools
25
from tools.information_gathering_tools import InformationGatheringTools
26
from tools.other_tools import OtherTools
27
from tools.payload_creator import PayloadCreatorTools
28
from tools.phising_attack import PhishingAttackTools
29
from tools.post_exploitation import PostExploitationTools
30
from tools.remote_administration import RemoteAdministrationTools
31
from tools.reverse_engineering import ReverseEngineeringTools
32
from tools.sql_tools import SqlInjectionTools
33
from tools.steganography import SteganographyTools
34
from tools.tool_manager import ToolManager
35
from tools.webattack import WebAttackTools
36
from tools.wireless_attack_tools import WirelessAttackTools
37
from tools.wordlist_generator import WordlistGeneratorTools
38
from tools.xss_attack import XSSAttackTools
39
40
console = Console()
41
42
ASCII_LOGO = r"""
43
▄█ █▄ ▄████████ ▄████████ ▄█ ▄█▄ ▄█ ███▄▄▄▄ ▄██████▄ ███ ▄██████▄ ▄██████▄ ▄█
44
███ ███ ███ ███ ███ ███ ███ ▄███▀ ███ ███▀▀▀██▄ ███ ███ ▀█████████▄ ███ ███ ███ ███ ███
45
███ ███ ███ ███ ███ █▀ ███▐██▀ ███▌ ███ ███ ███ █▀ ▀███▀▀██ ███ ███ ███ ███ ███
46
▄███▄▄▄▄███▄▄ ███ ███ ███ ▄█████▀ ███▌ ███ ███ ▄███ ███ ▀ ███ ███ ███ ███ ███
47
▀▀███▀▀▀▀███▀ ▀███████████ ███ ▀▀█████▄ ███▌ ███ ███ ▀▀███ ████▄ ███ ███ ███ ███ ███ ███
48
███ ███ ███ ███ ███ █▄ ███▐██▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
49
███ ███ ███ ███ ███ ███ ███ ▀███▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███▌ ▄
50
███ █▀ ███ █▀ ████████▀ ███ ▀█▀ █▀ ▀█ █▀ ████████▀ ▄████▀ ▀██████▀ ▀██████▀ █████▄▄██
51
▀ ▀
52
"""
53
54
tool_definitions = [
55
("Anonymously Hiding Tools", "🛡️"),
56
("Information gathering tools", "🔍"),
57
("Wordlist Generator", "📚"),
58
("Wireless attack tools", "📶"),
59
("SQL Injection Tools", "🧩"),
60
("Phishing attack tools", "🎣"),
61
("Web Attack tools", "🌐"),
62
("Post exploitation tools", "🔧"),
63
("Forensic tools", "🕵️"),
64
("Payload creation tools", "📦"),
65
("Exploit framework", "🧰"),
66
("Reverse engineering tools", "🔁"),
67
("DDOS Attack Tools", "⚡"),
68
("Remote Administrator Tools (RAT)", "🖥️"),
69
("XSS Attack Tools", "💥"),
70
("Steganograhy tools", "🖼️"),
71
("Other tools", "✨"),
72
("Update or Uninstall | Hackingtool", "♻️"),
73
]
74
75
all_tools = [
76
AnonSurfTools(),
77
InformationGatheringTools(),
78
WordlistGeneratorTools(),
79
WirelessAttackTools(),
80
SqlInjectionTools(),
81
PhishingAttackTools(),
82
WebAttackTools(),
83
PostExploitationTools(),
84
ForensicTools(),
85
PayloadCreatorTools(),
86
ExploitFrameworkTools(),
87
ReverseEngineeringTools(),
88
DDOSTools(),
89
RemoteAdministrationTools(),
90
XSSAttackTools(),
91
SteganographyTools(),
92
OtherTools(),
93
ToolManager()
94
]
95
96
97
class AllTools(HackingToolsCollection):
98
TITLE = "All tools"
99
TOOLS = all_tools
100
101
def show_info(self):
102
header = Text()
103
header.append(ASCII_LOGO, style="bold magenta")
104
header.append("\n\n",)
105
footer = Text.assemble(
106
(" https://github.com/Z4nzu/hackingtool ", "bold bright_black"),
107
(" | ",),
108
("Version 1.1.0", "bold green"),
109
)
110
warning = Text(" Please Don't Use For illegal Activity ", style="bold red")
111
panel = Panel(
112
Align.center(header + Text("\n") + footer + Text("\n") + warning),
113
box=box.DOUBLE,
114
padding=(1, 2),
115
border_style="magenta"
116
)
117
console.print(panel)
118
119
120
def build_menu():
121
table = Table.grid(expand=True)
122
table.add_column("idx", width=6, justify="right")
123
table.add_column("name", justify="left")
124
125
for idx, (title, icon) in enumerate(tool_definitions):
126
if idx == 17:
127
label = "[bold magenta]99[/bold magenta]"
128
name = f"[bold magenta]{icon} {title}[/bold magenta]"
129
else:
130
label = f"[bold magenta]{idx}[/bold magenta]"
131
name = f"[white]{icon}[/white] [magenta]{title}[/magenta]"
132
table.add_row(label, name)
133
134
top_panel = Panel(
135
Align.center(Text("HackingTool — Main Menu", style="bold white on magenta"), vertical="middle"),
136
style="magenta",
137
padding=(0, 1),
138
box=box.ROUNDED
139
)
140
menu_panel = Panel.fit(
141
table,
142
title="[bold magenta]Select a tool[/bold magenta]",
143
border_style="bright_magenta",
144
box=box.SQUARE
145
)
146
footer = Align.center(Text("Choose number and press Enter — 99 to exit", style="italic bright_black"))
147
console.print(top_panel)
148
console.print(menu_panel)
149
console.print(Rule(style="bright_black"))
150
console.print(footer)
151
console.print("")
152
153
154
def choose_path():
155
fpath = os.path.expanduser("~/hackingtoolpath.txt")
156
if not os.path.exists(fpath):
157
os.system("clear" if system() == "Linux" else "cls")
158
build_menu()
159
console.print(Panel("Setup path for tool installations", border_style="magenta"))
160
choice = Prompt.ask("[magenta]Set Path[/magenta]", choices=["1", "2"], default="2")
161
if choice == "1":
162
inpath = Prompt.ask("[magenta]Enter Path (with Directory Name)[/magenta]")
163
with open(fpath, "w") as f:
164
f.write(inpath)
165
console.print(f"[green]Successfully Set Path to:[/green] {inpath}")
166
else:
167
autopath = "/home/hackingtool/"
168
with open(fpath, "w") as f:
169
f.write(autopath)
170
console.print(f"[green]Your Default Path Is:[/green] {autopath}")
171
sleep(1)
172
return fpath
173
174
175
def interact_menu():
176
while True:
177
try:
178
build_menu()
179
choice = IntPrompt.ask("[magenta]Choose a tool to proceed[/magenta]", default=0)
180
if choice == 99:
181
console.print(Panel("[bold white on magenta]Goodbye — Come Back Safely[/bold white on magenta]"))
182
break
183
if 0 <= choice < len(all_tools):
184
tool = all_tools[choice]
185
name = tool_definitions[choice][0]
186
console.print(Panel(f"[bold magenta]{tool_definitions[choice][1]} Selected:[/bold magenta] [white]{name}"))
187
try:
188
fn = getattr(tool, "show_options", None)
189
if callable(fn):
190
fn()
191
else:
192
console.print(f"[yellow]Tool '{name}' has no interactive menu (show_options).[/yellow]")
193
except Exception as e:
194
console.print(Panel(f"[red]Error while opening {name}[/red]\n{e}", border_style="red"))
195
if not Confirm.ask("[magenta]Return to main menu?[/magenta]", default=True):
196
console.print(Panel("[bold white on magenta]Exiting...[/bold white on magenta]"))
197
break
198
else:
199
console.print("[red]Invalid selection. Pick a number from the menu.[/red]")
200
except KeyboardInterrupt:
201
console.print("\n[bold red]Interrupted by user — exiting[/bold red]")
202
break
203
204
def main():
205
try:
206
if system() == "Linux":
207
fpath = choose_path()
208
with open(fpath) as f:
209
archive = f.readline().strip()
210
os.makedirs(archive, exist_ok=True)
211
os.chdir(archive)
212
AllTools().show_info()
213
interact_menu()
214
elif system() == "Windows":
215
console.print(Panel("[bold red]Please run this tool on a Debian/Linux system for best results[/bold red]"))
216
if Confirm.ask("Open guidance link in your browser?", default=True):
217
webbrowser.open_new_tab("https://tinyurl.com/y522modc")
218
sleep(2)
219
else:
220
console.print("[yellow]Please Check Your System or Open New Issue ...[/yellow]")
221
except KeyboardInterrupt:
222
console.print("\n[bold red]Exiting ..!!![/bold red]")
223
sleep(1)
224
225
226
if __name__ == "__main__":
227
main()
228
229