Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Z4nzu
GitHub Repository: Z4nzu/hackingtool
Path: blob/master/tools/wordlist_generator.py
1753 views
1
# coding=utf-8
2
import os
3
import subprocess
4
5
from rich.console import Console
6
from rich.theme import Theme
7
from rich.table import Table
8
from rich.panel import Panel
9
from rich.prompt import Prompt
10
from rich import box
11
12
from core import HackingTool
13
from core import HackingToolsCollection
14
15
_theme = Theme({"purple": "#7B61FF"})
16
console = Console(theme=_theme)
17
18
19
class Cupp(HackingTool):
20
TITLE = "Cupp"
21
DESCRIPTION = "WlCreator is a C program that can create all possibilities of passwords,\n " \
22
"and you can choose Length, Lowercase, Capital, Numbers and Special Chars"
23
INSTALL_COMMANDS = ["git clone https://github.com/Mebus/cupp.git"]
24
RUN_COMMANDS = ["cd cupp && python3 cupp.py -i"]
25
PROJECT_URL = "https://github.com/Mebus/cupp"
26
27
def show_info(self):
28
panel = Panel(
29
f"[bold purple]{self.TITLE}[/bold purple]\n\n"
30
f"[cyan]{self.DESCRIPTION}[/cyan]\n\n"
31
f"[green]Repository:[/green] [underline blue]{self.PROJECT_URL}[/underline blue]",
32
border_style="purple",
33
box=box.ROUNDED,
34
)
35
console.print(panel)
36
37
38
class WlCreator(HackingTool):
39
TITLE = "WordlistCreator"
40
DESCRIPTION = "WlCreator is a C program that can create all possibilities" \
41
" of passwords,\n and you can choose Length, Lowercase, " \
42
"Capital, Numbers and Special Chars"
43
INSTALL_COMMANDS = ["sudo git clone https://github.com/Z4nzu/wlcreator.git"]
44
RUN_COMMANDS = [
45
"cd wlcreator && sudo gcc -o wlcreator wlcreator.c && ./wlcreator 5"]
46
PROJECT_URL = "https://github.com/Z4nzu/wlcreator"
47
48
def show_info(self):
49
panel = Panel(
50
f"[bold purple]{self.TITLE}[/bold purple]\n\n"
51
f"[cyan]{self.DESCRIPTION}[/cyan]\n\n"
52
f"[green]Repository:[/green] [underline blue]{self.PROJECT_URL}[/underline blue]",
53
border_style="purple",
54
box=box.ROUNDED,
55
)
56
console.print(panel)
57
58
59
class GoblinWordGenerator(HackingTool):
60
TITLE = "Goblin WordGenerator"
61
DESCRIPTION = "Goblin WordGenerator"
62
INSTALL_COMMANDS = [
63
"sudo git clone https://github.com/UndeadSec/GoblinWordGenerator.git"]
64
RUN_COMMANDS = ["cd GoblinWordGenerator && python3 goblin.py"]
65
PROJECT_URL = "https://github.com/UndeadSec/GoblinWordGenerator.git"
66
67
def show_info(self):
68
panel = Panel(
69
f"[bold purple]{self.TITLE}[/bold purple]\n\n"
70
f"[cyan]{self.DESCRIPTION}[/cyan]\n\n"
71
f"[green]Repository:[/green] [underline blue]{self.PROJECT_URL}[/underline blue]",
72
border_style="purple",
73
box=box.ROUNDED,
74
)
75
console.print(panel)
76
77
78
class showme(HackingTool):
79
TITLE = "Password list (1.4 Billion Clear Text Password)"
80
DESCRIPTION = "This tool allows you to perform OSINT and reconnaissance on " \
81
"an organisation or an individual. It allows one to search " \
82
"1.4 Billion clear text credentials which was dumped as " \
83
"part of BreachCompilation leak. This database makes " \
84
"finding passwords faster and easier than ever before."
85
INSTALL_COMMANDS = [
86
"sudo git clone https://github.com/Viralmaniar/SMWYG-Show-Me-What-You-Got.git",
87
"cd SMWYG-Show-Me-What-You-Got && pip3 install -r requirements.txt"
88
]
89
RUN_COMMANDS = ["cd SMWYG-Show-Me-What-You-Got && python SMWYG.py"]
90
PROJECT_URL = "https://github.com/Viralmaniar/SMWYG-Show-Me-What-You-Got"
91
92
def show_info(self):
93
panel = Panel(
94
f"[bold purple]{self.TITLE}[/bold purple]\n\n"
95
f"[cyan]{self.DESCRIPTION}[/cyan]\n\n"
96
f"[green]Repository:[/green] [underline blue]{self.PROJECT_URL}[/underline blue]",
97
border_style="purple",
98
box=box.ROUNDED,
99
)
100
console.print(panel)
101
102
103
class WordlistGeneratorTools(HackingToolsCollection):
104
TITLE = "Wordlist Generator"
105
TOOLS = [
106
Cupp(),
107
WlCreator(),
108
GoblinWordGenerator(),
109
showme()
110
]
111
112
def show_info(self):
113
header = Panel(f"[bold white on purple] {self.TITLE} [/bold white on purple]",
114
border_style="purple", box=box.DOUBLE)
115
console.print(header)
116
table = Table(box=box.SIMPLE, show_header=True, header_style="bold purple")
117
table.add_column("#", justify="center", style="cyan", width=4)
118
table.add_column("Tool", style="bold")
119
table.add_column("Description", style="dim", overflow="fold")
120
121
for idx, t in enumerate(self.TOOLS, start=1):
122
desc = getattr(t, "DESCRIPTION", "") or ""
123
table.add_row(str(idx), t.TITLE, desc)
124
125
table.add_row("[red]99[/red]", "[bold red]Exit[/bold red]", "Return to previous menu")
126
console.print(table)
127
128
def show_options(self, parent=None):
129
console.print("\n")
130
panel = Panel.fit("[bold magenta]Wordlist Generator Collection[/bold magenta]\n"
131
"Select a tool to view details or run it.",
132
border_style="purple")
133
console.print(panel)
134
135
table = Table(title="[bold cyan]Available Tools[/bold cyan]", show_lines=True, expand=True)
136
table.add_column("Index", justify="center", style="bold yellow")
137
table.add_column("Tool Name", justify="left", style="bold green")
138
table.add_column("Description", justify="left", style="white")
139
140
for i, tool in enumerate(self.TOOLS):
141
title = getattr(tool, "TITLE", tool.__class__.__name__)
142
desc = getattr(tool, "DESCRIPTION", "—")
143
table.add_row(str(i + 1), title, desc or "—")
144
145
table.add_row("[red]99[/red]", "[bold red]Exit[/bold red]", "Return to previous menu")
146
console.print(table)
147
148
try:
149
choice = Prompt.ask("[bold cyan]Select a tool to view/run[/bold cyan]", default="99")
150
choice = int(choice)
151
if 1 <= choice <= len(self.TOOLS):
152
selected = self.TOOLS[choice - 1]
153
if hasattr(selected, "show_info"):
154
selected.show_info()
155
elif hasattr(selected, "run"):
156
selected.run()
157
else:
158
console.print("[bold yellow]Selected tool has no runnable interface.[/bold yellow]")
159
elif choice == 99:
160
return 99
161
except Exception:
162
console.print("[bold red]Invalid choice. Try again.[/bold red]")
163
return self.show_options(parent=parent)
164
165
166
if __name__ == "__main__":
167
tools = WordlistGeneratorTools()
168
tools.show_info()
169
tools.show_options()
170