-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathterminal_message_handler.py
More file actions
44 lines (28 loc) · 961 Bytes
/
terminal_message_handler.py
File metadata and controls
44 lines (28 loc) · 961 Bytes
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
"""
@author Merlin von der Weide
@version 2.0.0
@date 2025
"""
import sys
from colorama import Fore, init as colorama_init
# Initialize colorama for Windows support
colorama_init(autoreset=True)
def print_error(message, fatal=True):
print(Fore.RED, "[!] ERROR: %s" % message)
if fatal:
sys.exit(1)
def print_warning(message):
print(Fore.YELLOW, "[-] WARN: %s" % message)
def print_info(message):
print(Fore.LIGHTBLUE_EX, "[+] INFO: %s" % message)
def print_success(message):
print(Fore.GREEN, "%s" % message)
def print_found(message):
"""Print a 'found' message in green."""
print(Fore.GREEN + "[✓] " + str(message) + Fore.RESET)
def print_not_found(message):
"""Print a 'not found' message in red."""
print(Fore.RED + "[✗] " + str(message) + Fore.RESET)
def print_partial(message):
"""Print a 'partial/warning' message in yellow."""
print(Fore.YELLOW + "[~] " + str(message) + Fore.RESET)