diff --git a/utils/console.py b/utils/console.py index eef354f..ac22818 100644 --- a/utils/console.py +++ b/utils/console.py @@ -1,4 +1,5 @@ import colorama +import datetime import os, sys, pystyle from . import config @@ -15,6 +16,9 @@ def resize(columns, rows): else: os.system(f"echo '\033[8;{rows};{columns}t'") +def get_formatted_time(): + return datetime.datetime.now().strftime("%H:%M:%S") + def print_banner(): copyright_ = f"( Ghost v{config.VERSION} )" banner = f""" ██████╗ ██╗ ██╗ ██████╗ ███████╗████████╗ @@ -47,19 +51,19 @@ def print_color(color, text): print(color + text + colorama.Style.RESET_ALL) def print_cmd(text): - print(f"{colorama.Fore.LIGHTBLUE_EX}{colorama.Style.BRIGHT}[COMMAND]{colorama.Style.RESET_ALL} {text}") + print(f"{colorama.Fore.LIGHTBLACK_EX}[{get_formatted_time()}] {colorama.Fore.LIGHTBLUE_EX}{colorama.Style.BRIGHT}[COMMAND]{colorama.Style.RESET_ALL} {text}") def print_info(text): - print(f"{colorama.Fore.LIGHTGREEN_EX}{colorama.Style.BRIGHT}[INFO]{colorama.Style.RESET_ALL} {text}") + print(f"{colorama.Fore.LIGHTBLACK_EX}[{get_formatted_time()}] {colorama.Fore.LIGHTGREEN_EX}{colorama.Style.BRIGHT}[INFO]{colorama.Style.RESET_ALL} {text}") def print_success(text): - print(f"{colorama.Fore.LIGHTGREEN_EX}{colorama.Style.BRIGHT}[SUCCESS]{colorama.Style.RESET_ALL} {text}") + print(f"{colorama.Fore.LIGHTBLACK_EX}[{get_formatted_time()}] {colorama.Fore.LIGHTGREEN_EX}{colorama.Style.BRIGHT}[SUCCESS]{colorama.Style.RESET_ALL} {text}") def print_error(text): - print(f"{colorama.Fore.LIGHTRED_EX}{colorama.Style.BRIGHT}[ERROR]{colorama.Style.RESET_ALL} {text}") + print(f"{colorama.Fore.LIGHTBLACK_EX}[{get_formatted_time()}] {colorama.Fore.LIGHTRED_EX}{colorama.Style.BRIGHT}[ERROR]{colorama.Style.RESET_ALL} {text}") def print_warning(text): - print(f"{colorama.Fore.LIGHTYELLOW_EX}{colorama.Style.BRIGHT}[WARNING]{colorama.Style.RESET_ALL} {text}") + print(f"{colorama.Fore.LIGHTBLACK_EX}[{get_formatted_time()}] {colorama.Fore.LIGHTYELLOW_EX}{colorama.Style.BRIGHT}[WARNING]{colorama.Style.RESET_ALL} {text}") def print_cli(text): - print(f"{colorama.Fore.LIGHTMAGENTA_EX}{colorama.Style.BRIGHT}[CLI]{colorama.Style.RESET_ALL} {text}") \ No newline at end of file + print(f"{colorama.Fore.LIGHTBLACK_EX}[{get_formatted_time()}] {colorama.Fore.LIGHTMAGENTA_EX}{colorama.Style.BRIGHT}[CLI]{colorama.Style.RESET_ALL} {text}") \ No newline at end of file