-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path3th1c4l.py
200 lines (170 loc) · 11.6 KB
/
3th1c4l.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
import os
import sys
import shutil
import time
import threading
import itertools
from functools import lru_cache
from colorama import init, Fore, Style
import questionary
import getpass
from importlib import import_module
init(autoreset=True)
username = getpass.getuser()
def loading_spinner():
spinner = itertools.cycle(['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'])
while not loading_spinner.done:
sys.stdout.write(f'\r{Fore.RED}Loading {Fore.LIGHTGREEN_EX}{next(spinner)} ')
sys.stdout.flush()
time.sleep(0.1)
sys.stdout.write('\r' + ' ' * 20 + '\r')
sys.stdout.flush()
loading_spinner.done = False
def animate_loading(duration=1.0):
loading_spinner.done = False
spinner_thread = threading.Thread(target=loading_spinner)
spinner_thread.start()
time.sleep(duration)
loading_spinner.done = True
spinner_thread.join()
@lru_cache(maxsize=1)
def get_terminal_width(default_width=80):
try:
width = shutil.get_terminal_size().columns
return max(80, width)
except Exception:
return default_width
def set_cmd_title_and_color():
if os.name == 'nt':
os.system('title [3TH1C4L] Multi-Tool && color 0A')
# Dictionary with lazy loading for easy implementation
TOOLS = {
'1': {'name': 'My Public IP Address', 'module': 'scripts.show_my_ip', 'function': 'run', 'page': 1},
'2': {'name': 'IP Scanner', 'module': 'scripts.ip_scanner', 'function': 'run', 'page': 1},
'3': {'name': 'IP Pinger', 'module': 'scripts.ip_pinger', 'function': 'run_ip_pinger', 'page': 1},
'4': {'name': 'IP Port Scanner', 'module': 'scripts.ip_port_scanner', 'function': 'run', 'page': 1},
'5': {'name': 'Website Info Scanner', 'module': 'scripts.website_info_scanner', 'function': 'run', 'page': 1},
'6': {'name': 'Username Tracker', 'module': 'scripts.username_tracker', 'function': 'run', 'page': 1},
'11': {'name': 'Password Generator', 'module': 'scripts.password_generator', 'function': 'run', 'page': 1},
'16': {'name': 'Discord Server Info', 'module': 'scripts.discord_server_info', 'function': 'run', 'page': 2},
'17': {'name': 'Discord Nitro Generator', 'module': 'scripts.discord_nitro_generator', 'function': 'run', 'page': 2},
'21': {'name': 'Discord Webhook Deleter', 'module': 'scripts.discord_webhook_deleter', 'function': 'run', 'page': 2},
'22': {'name': 'Discord Webhook Spammer', 'module': 'scripts.discord_webhook_spammer', 'function': 'run', 'page': 2},
'26': {'name': 'Discord Token Info', 'module': 'scripts.discord_token_info', 'function': 'run', 'page': 2},
'27': {'name': 'Token Delete DM', 'module': 'scripts.discord_token_delete_dm', 'function': 'run', 'page': 2},
'28': {'name': 'Discord Token User ID Blocker', 'module': 'scripts.discord_token_block_friends', 'function': 'run', 'page': 2},
}
def smooth_gradient_print(text, start_color, end_color):
steps = len(text) - 1 if len(text) > 1 else 1
r_start, g_start, b_start = start_color
r_end, g_end, b_end = end_color
gradient_text = "".join(
f'\033[38;2;{int(r_start + (r_end - r_start) * (i / steps))};'
f'{int(g_start + (g_end - g_start) * (i / steps))};'
f'{int(b_start + (b_end - b_start) * (i / steps))}m{char}'
for i, char in enumerate(text)
)
print(gradient_text + Style.RESET_ALL)
def center_text(text, width=None):
return text.center(width or get_terminal_width())
ASCII_LOGO = r"""
/* ++------------------------------------------------------------------++ */
/* ++------------------------------------------------------------------++ */
/* || ▓█████ ▄▄▄█████▓ ██░ ██ ▐██▌ ▄████▄ ▄▄▄ ██▓ || */
/* || ▓█ ▀ ▓ ██▒ ▓▒▓██░ ██▒ ▐██▌ ▒██▀ ▀█ ▒████▄ ▓██▒ || */
/* || ▒███ ▒ ▓██░ ▒░▒██▀▀██░ ▐██▌ ▒▓█ ▄ ▒██ ▀█▄ ▒██░ || */
/* || ▒▓█ ▄ ░ ▓██▓ ░ ░▓█ ░██ ▓██▒ ▒▓▓▄ ▄██▒░██▄▄▄▄██ ▒██░ || */
/* || ░▒████▒ ▒██▒ ░ ░▓█▒░██▓ ▒▄▄ ▒ ▓███▀ ░ ▓█ ▓██▒░██████▒ || */
/* || ░░ ▒░ ░ ▒ ░░ ▒ ░░▒░▒ ░▀▀▒ ░ ░▒ ▒ ░ ▒▒ ▓▒█░░ ▒░▓ ░ || */
/* || ░ ░ ░ ░ ▒ ░▒░ ░ ░ ░ ░ ▒ ▒ ▒▒ ░░ ░ ▒ ░ || */
/* || ░ ░ ░ ░░ ░ ░ ░ ░ ▒ ░ ░ || */
/* || ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ || */
/* || [RPxGoon]░ || */
/* ++------------------------------------------------------------------++ */
/* ++------------------------------------------------------------------++ */
Simple 'CLI' Python Multi-Tool
[https://github.com/RPxGoon/3TH1C4L-MultiTool]
"""
def print_ascii_logo():
width = get_terminal_width()
start_color = (255, 0, 0)
end_color = (75, 0, 148)
for line in ASCII_LOGO.splitlines():
smooth_gradient_print(center_text(line, width), start_color, end_color)
def print_menu(page=1):
os.system('cls' if os.name == 'nt' else 'clear')
width = get_terminal_width()
print_ascii_logo()
if page == 1:
section_width = width // 3
box_border_length = section_width - 2
print(Fore.MAGENTA + "╓" + "─" * box_border_length + "╖" + "╓" + "─" * box_border_length + "╖" + "╓" + "─" * box_border_length + "╖")
print(Fore.MAGENTA + " NETWORK SCANNERS".center(box_border_length) + " OSINT".center(box_border_length) + " OTHER".center(box_border_length))
print(Fore.MAGENTA + "╙" + "─" * box_border_length + "╜" + "╙" + "─" * box_border_length + "╜" + "╙" + "─" * box_border_length + "╜")
print(f"{Fore.RED}├─ [{Fore.MAGENTA}01{Fore.RED}] Show My IP".ljust(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}06{Fore.RED}] Username Tracker".center(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}11{Fore.RED}] Password Generator".rjust(section_width))
print(f"{Fore.RED}├─ [{Fore.MAGENTA}02{Fore.RED}] IP Scanner".ljust(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}07{Fore.RED}] Coming Soon...".center(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}12{Fore.RED}] Coming Soon...".rjust(section_width))
print(f"{Fore.RED}├─ [{Fore.MAGENTA}03{Fore.RED}] IP Pinger".ljust(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}08{Fore.RED}] Coming Soon...".center(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}13{Fore.RED}] Coming Soon...".rjust(section_width))
print(f"{Fore.RED}├─ [{Fore.MAGENTA}04{Fore.RED}] IP Port Scanner".ljust(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}09{Fore.RED}] Coming Soon...".center(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}14{Fore.RED}] Coming Soon...".rjust(section_width))
print(f"{Fore.RED}├─ [{Fore.MAGENTA}05{Fore.RED}] Website Info Scanner".ljust(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}10{Fore.RED}] Coming Soon...".center(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}15{Fore.RED}] Coming Soon...".rjust(section_width))
elif page == 2:
section_width = width // 3
print(Fore.MAGENTA + "╓" + "─" * (width - 2) + "╖")
print(Fore.MAGENTA + " " * ((width - len("DISCORD TOOLS")) // 2) + "DISCORD TOOLS")
print(Fore.MAGENTA + "╙" + "─" * (width - 2) + "╜")
print(f"{Fore.RED}├─ [{Fore.MAGENTA}16{Fore.RED}] Discord Server Info".ljust(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}21{Fore.RED}] Delete Discord Webhook".center(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}26{Fore.RED}] Discord Token Info".rjust(section_width))
print(f"{Fore.RED}├─ [{Fore.MAGENTA}17{Fore.RED}] Discord Nitro Generator".ljust(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}22{Fore.RED}] Discord Webhook Spammer".center(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}27{Fore.RED}] Discord Token Delete DM".rjust(section_width))
print(f"{Fore.RED}├─ [{Fore.MAGENTA}18{Fore.RED}] Coming Soon...".ljust(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}23{Fore.RED}] Coming Soon...".center(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}28{Fore.RED}] Discord Token Friend Blocker".rjust(section_width))
print(f"{Fore.RED}├─ [{Fore.MAGENTA}19{Fore.RED}] Coming Soon...".ljust(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}24{Fore.RED}] Coming Soon...".center(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}29{Fore.RED}] Coming Soon...".rjust(section_width))
print(f"{Fore.RED}├─ [{Fore.MAGENTA}20{Fore.RED}] Coming Soon...".ljust(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}25{Fore.RED}] Coming Soon...".center(section_width) + f"{Fore.RED} ├─ [{Fore.MAGENTA}30{Fore.RED}] Coming Soon...".rjust(section_width))
print(f"{''.rjust((126))}{Fore.RED} {Fore.RED}├─ [{Fore.MAGENTA}N{Fore.RED}] Next | [{Fore.MAGENTA}B{Fore.RED}] Back | [{Fore.MAGENTA}E{Fore.RED}] Exit".rjust(126))
print()
CUSTOM_STYLE = questionary.Style([
("question", "bold lime"),
("answer", "lime"),
("pointer", "lime"),
("selected", "lime"),
("input", "lime"),
("highlighted", "lime"),
("instruction", "lime"),
("text", "red bold"),
("prompt", "lime"),
])
def run_tool():
set_cmd_title_and_color()
current_page = 1
while True:
print_menu(current_page)
choice = questionary.text(
f"┌──({username}@3TH1C4L)─[~/main]\n └─$",
qmark="",
style=CUSTOM_STYLE,
).ask()
if choice.lower() == 'n' and current_page == 1:
animate_loading(0.3) # Add loading animation for page change
current_page = 2
elif choice.lower() == 'b' and current_page == 2:
animate_loading(0.3)
current_page = 1
elif choice.lower() == 'e':
animate_loading(0.5)
print(f"{Fore.RED}[!] {Fore.LIGHTGREEN_EX}Exiting... Goodbye!")
break
elif choice in TOOLS:
tool = TOOLS[choice]
if tool['page'] == current_page:
animate_loading(0.3)
print(f"{Fore.MAGENTA}[{tool['name']}]")
print()
module = import_module(tool['module'])
getattr(module, tool['function'])()
else:
animate_loading(0.3)
print(f"{Fore.RED}[!] Invalid Choice. Please Select a Valid Option")
else:
animate_loading(0.3)
print(f"{Fore.RED}[!] Invalid Choice. Please Select a Valid Option")
if choice.lower() not in ['n', 'b', 'e']:
input(f"{Fore.RED}[*] {Fore.LIGHTGREEN_EX}Press 'Enter' to Continue...")
os.system('cls' if os.name == 'nt' else 'clear')
if __name__ == "__main__":
run_tool()