예제 #1
0
def info(string, logger=None):
    """Prints a info message."""
    if logger:
        logger.info(string)
    if get_os() == 'Windows':
        print('[i] ' + string)
    else:
        print(color_text('[i] ', 'cyan') + string)
예제 #2
0
def warning(string, logger=None):
    """Prints a warning message."""
    if logger:
        logger.warning(string)
    if get_os() == 'Windows':
        print('[!] ' + string)
    else:
        print(color_text('[!] ', 'yellow') + string)
예제 #3
0
def error(string, logger=None):
    """Prints a error message."""
    if logger:
        logger.error(string)
    if get_os() == 'Windows':
        print('[x] ' + string)
    else:
        print(color_text('[✗] ', 'magenta') + string)
예제 #4
0
def success(string, logger=None):
    """Prints a success message."""
    if logger:
        logger.info(string)
    if get_os() == 'Windows':
        print('[+] ' + string)
    else:
        print(color_text('[✓] ', 'green') + string)
예제 #5
0
def subheader(string, logger=None):
    """Prints a subheader."""
    if logger:
        logger.info(string)

    if get_os() == 'Windows':
        print('==> ' + string)
    else:
        print(color_text('==> ', 'blue') + string)
예제 #6
0
def header(string, logger=None):
    """Prints a header."""
    if logger:
        logger.info(string)

    if get_os() == 'Windows':
        print('==> ' + string)
    else:
        print(color_text('==> ', 'green') + color_text(string, 'white'))