INNER CODE UNIT · Python

format_output

gotr00t0day/Gsec · modules/__init__.py:3

def format_output(message: str, status: str = "info", prefix_color: str = Fore.MAGENTA, separator_color: str = Fore.CYAN, text_color: str = Fore.WHITE) -> None:
    """
    Format output messages consistently with the existing style.
    
    Args:
        message: The message to display
        status: Type of message ('info', 'success', 'warning', 'error')
        prefix_color: Color for the [+]/[-] prefix
        separator_color: Color for the separator
        text_color: Color for the main text
    """
    if status == "info" or status == "success":
        prefix = "[+]"
    elif status == "warning" or status == "error":
        prefix = "[-]"
    else:
        prefix = "[+]"
    

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…