1
0
mirror of https://github.com/Z4nzu/hackingtool.git synced 2026-06-09 00:16:18 +02:00
Files
hackingtool/hackingtool.py
T

212 lines
9.2 KiB
Python
Raw Normal View History

2023-03-04 16:02:23 +01:00
#!/usr/bin/env python3
import sys
2026-03-15 13:54:30 +05:30
# ── Python version guard (must be before any other local import) ───────────────
if sys.version_info < (3, 10):
print(
f"[ERROR] Python 3.10 or newer is required.\n"
f"You are running Python {sys.version_info.major}.{sys.version_info.minor}.\n"
f"Upgrade with: sudo apt install python3.10"
)
sys.exit(1)
import os
2020-06-27 11:35:51 +05:30
import webbrowser
2020-08-14 16:41:59 +05:30
from platform import system
2020-07-18 15:28:01 -03:00
2025-10-14 02:02:18 -04:00
from rich.console import Console
from rich.panel import Panel
from rich.table import Table
2026-03-15 13:54:30 +05:30
from rich.prompt import IntPrompt, Confirm
2025-10-14 02:02:18 -04:00
from rich.align import Align
from rich.text import Text
from rich import box
from rich.rule import Rule
2020-08-14 16:41:59 +05:30
from core import HackingToolsCollection
2026-03-15 13:54:30 +05:30
from constants import VERSION_DISPLAY, REPO_WEB_URL
from config import get_tools_dir
2020-08-14 16:41:59 +05:30
from tools.anonsurf import AnonSurfTools
from tools.ddos import DDOSTools
from tools.exploit_frameworks import ExploitFrameworkTools
2026-03-15 13:55:05 +05:30
from tools.forensics import ForensicTools
from tools.information_gathering import InformationGatheringTools
2020-08-14 16:41:59 +05:30
from tools.other_tools import OtherTools
from tools.payload_creator import PayloadCreatorTools
2026-03-15 13:55:05 +05:30
from tools.phishing_attack import PhishingAttackTools
2020-08-14 16:41:59 +05:30
from tools.post_exploitation import PostExploitationTools
from tools.remote_administration import RemoteAdministrationTools
from tools.reverse_engineering import ReverseEngineeringTools
2026-03-15 13:55:05 +05:30
from tools.sql_injection import SqlInjectionTools
2020-08-14 16:41:59 +05:30
from tools.steganography import SteganographyTools
from tools.tool_manager import ToolManager
2026-03-15 13:55:05 +05:30
from tools.web_attack import WebAttackTools
from tools.wireless_attack import WirelessAttackTools
2020-08-14 16:41:59 +05:30
from tools.wordlist_generator import WordlistGeneratorTools
from tools.xss_attack import XSSAttackTools
2020-07-18 15:28:01 -03:00
2025-10-14 02:02:18 -04:00
console = Console()
ASCII_LOGO = r"""
2026-03-15 13:54:30 +05:30
▄█ █▄ ▄████████ ▄████████ ▄█ ▄█▄ ▄█ ███▄▄▄▄ ▄██████▄ ███ ▄██████▄ ▄██████▄ ▄█
███ ███ ███ ███ ███ ███ ███ ▄███▀ ███ ███▀▀▀██▄ ███ ███ ▀█████████▄ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ █▀ ███▐██▀ ███▌ ███ ███ ███ █▀ ▀███▀▀██ ███ ███ ███ ███ ███
▄███▄▄▄▄███▄▄ ███ ███ ███ ▄█████▀ ███▌ ███ ███ ▄███ ███ ▀ ███ ███ ███ ███ ███
▀▀███▀▀▀▀███▀ ▀███████████ ███ ▀▀█████▄ ███▌ ███ ███ ▀▀███ ████▄ ███ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ █▄ ███▐██▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ ███ ███ ▀███▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███▌ ▄
███ █▀ ███ █▀ ████████▀ ███ ▀█▀ █▀ ▀█ █▀ ████████▀ ▄████▀ ▀██████▀ ▀██████▀ █████▄▄██
▀ ▀
2025-10-14 02:02:18 -04:00
"""
tool_definitions = [
2026-03-15 13:54:30 +05:30
("Anonymously Hiding Tools", "🛡️"),
("Information gathering tools", "🔍"),
("Wordlist Generator", "📚"),
("Wireless attack tools", "📶"),
("SQL Injection Tools", "🧩"),
("Phishing attack tools", "🎣"),
("Web Attack tools", "🌐"),
("Post exploitation tools", "🔧"),
("Forensic tools", "🕵️"),
("Payload creation tools", "📦"),
("Exploit framework", "🧰"),
("Reverse engineering tools", "🔁"),
("DDOS Attack Tools", ""),
("Remote Administrator Tools (RAT)", "🖥️"),
("XSS Attack Tools", "💥"),
("Steganography tools", "🖼️"),
("Other tools", ""),
("Update or Uninstall | Hackingtool", "♻️"),
2025-10-14 02:02:18 -04:00
]
2020-07-18 15:28:01 -03:00
2020-08-14 16:41:59 +05:30
all_tools = [
AnonSurfTools(),
InformationGatheringTools(),
WordlistGeneratorTools(),
WirelessAttackTools(),
SqlInjectionTools(),
PhishingAttackTools(),
WebAttackTools(),
PostExploitationTools(),
ForensicTools(),
PayloadCreatorTools(),
ExploitFrameworkTools(),
ReverseEngineeringTools(),
DDOSTools(),
RemoteAdministrationTools(),
XSSAttackTools(),
SteganographyTools(),
OtherTools(),
2026-03-15 13:54:30 +05:30
ToolManager(),
2020-08-14 16:41:59 +05:30
]
class AllTools(HackingToolsCollection):
TITLE = "All tools"
TOOLS = all_tools
def show_info(self):
2026-03-15 13:54:30 +05:30
header = Text(ASCII_LOGO, style="bold magenta")
2025-10-14 02:02:18 -04:00
footer = Text.assemble(
2026-03-15 13:54:30 +05:30
(f" {REPO_WEB_URL} ", "bold bright_black"),
2025-10-14 02:02:18 -04:00
(" | ",),
2026-03-15 13:54:30 +05:30
(VERSION_DISPLAY, "bold green"),
2025-10-14 02:02:18 -04:00
)
2026-03-15 13:54:30 +05:30
warning = Text(" Please Don't Use For Illegal Activity ", style="bold red")
2025-10-14 02:02:18 -04:00
panel = Panel(
Align.center(header + Text("\n") + footer + Text("\n") + warning),
box=box.DOUBLE,
padding=(1, 2),
2026-03-15 13:54:30 +05:30
border_style="magenta",
2025-10-14 02:02:18 -04:00
)
console.print(panel)
2020-07-18 15:28:01 -03:00
2020-06-27 11:35:51 +05:30
2025-10-14 02:02:18 -04:00
def build_menu():
table = Table.grid(expand=True)
table.add_column("idx", width=6, justify="right")
table.add_column("name", justify="left")
2020-08-14 16:41:59 +05:30
2025-10-14 02:02:18 -04:00
for idx, (title, icon) in enumerate(tool_definitions):
2026-03-15 13:54:30 +05:30
if idx == len(tool_definitions) - 1:
2025-10-14 02:02:18 -04:00
label = "[bold magenta]99[/bold magenta]"
2026-03-15 13:54:30 +05:30
name = f"[bold magenta]{icon} {title}[/bold magenta]"
2025-10-14 02:02:18 -04:00
else:
label = f"[bold magenta]{idx}[/bold magenta]"
2026-03-15 13:54:30 +05:30
name = f"[white]{icon}[/white] [magenta]{title}[/magenta]"
2025-10-14 02:02:18 -04:00
table.add_row(label, name)
2026-03-15 13:54:30 +05:30
console.print(Panel(
2025-10-14 02:02:18 -04:00
Align.center(Text("HackingTool — Main Menu", style="bold white on magenta"), vertical="middle"),
2026-03-15 13:54:30 +05:30
style="magenta", padding=(0, 1), box=box.ROUNDED,
))
console.print(Panel.fit(
2025-10-14 02:02:18 -04:00
table,
title="[bold magenta]Select a tool[/bold magenta]",
border_style="bright_magenta",
2026-03-15 13:54:30 +05:30
box=box.SQUARE,
))
2025-10-14 02:02:18 -04:00
console.print(Rule(style="bright_black"))
2026-03-15 13:54:30 +05:30
console.print(Align.center(Text(
"Choose number and press Enter — 99 to exit",
style="italic bright_black",
)))
2025-10-14 02:02:18 -04:00
console.print("")
def interact_menu():
while True:
try:
build_menu()
choice = IntPrompt.ask("[magenta]Choose a tool to proceed[/magenta]", default=0)
if choice == 99:
console.print(Panel("[bold white on magenta]Goodbye — Come Back Safely[/bold white on magenta]"))
break
if 0 <= choice < len(all_tools):
tool = all_tools[choice]
name = tool_definitions[choice][0]
2026-03-15 13:54:30 +05:30
console.print(Panel(
f"[bold magenta]{tool_definitions[choice][1]} Selected:[/bold magenta] [white]{name}[/white]"
))
2025-10-14 02:02:18 -04:00
try:
2026-03-15 13:54:30 +05:30
tool.show_options()
2025-10-14 02:02:18 -04:00
except Exception as e:
console.print(Panel(f"[red]Error while opening {name}[/red]\n{e}", border_style="red"))
if not Confirm.ask("[magenta]Return to main menu?[/magenta]", default=True):
console.print(Panel("[bold white on magenta]Exiting...[/bold white on magenta]"))
break
else:
console.print("[red]Invalid selection. Pick a number from the menu.[/red]")
except KeyboardInterrupt:
2026-03-15 13:54:30 +05:30
console.print("\n[bold red]Interrupted — exiting[/bold red]")
2025-10-14 02:02:18 -04:00
break
2026-03-15 13:54:30 +05:30
2025-10-14 02:02:18 -04:00
def main():
try:
2026-03-15 13:54:30 +05:30
from os_detect import CURRENT_OS
if CURRENT_OS.system == "windows":
console.print(Panel("[bold red]Please run this tool on Linux or macOS.[/bold red]"))
2025-10-14 02:02:18 -04:00
if Confirm.ask("Open guidance link in your browser?", default=True):
2026-03-15 13:54:30 +05:30
webbrowser.open_new_tab(f"{REPO_WEB_URL}#windows")
return
if CURRENT_OS.system not in ("linux", "macos"):
console.print(f"[yellow]Unsupported OS: {CURRENT_OS.system}. Proceeding anyway...[/yellow]")
# Ensure ~/.hackingtool/tools/ exists — no os.chdir(), tools use absolute paths
tools_dir = get_tools_dir()
console.print(f"[dim]Tools directory: {tools_dir}[/dim]")
AllTools().show_info()
interact_menu()
2020-08-14 16:41:59 +05:30
except KeyboardInterrupt:
2026-03-15 13:54:30 +05:30
console.print("\n[bold red]Exiting...[/bold red]")
2025-10-14 02:02:18 -04:00
if __name__ == "__main__":
main()