# Path: interface/messages.py
# def print_error(*args, **kwargs):
#     print(Color.RED + Color.BOLD + "[-]" + Color.ENDC, *args, **kwargs)
# 
# def print_help(*args, **kwargs):
#     print(Color.PURPLE + Color.BOLD + "[?]" + Color.ENDC, *args, **kwargs)
# 
# def print_info(*args, **kwargs):
#     print(Color.BLUE + Color.BOLD + "[*]" + Color.ENDC, *args, **kwargs)
# 
# def print_warning(*args, **kwargs):
#     print(Color.YELLOW + Color.BOLD + "[!]" + Color.ENDC, *args, **kwargs)
# 
# def print_red(msg):
#     print(Color.RED + msg + Color.ENDC)
# 
# def print_success(*args, **kwargs):
#     print(Color.GREEN + Color.BOLD + "[+]" + Color.ENDC, *args, **kwargs)


import core.io
import time
import base64
import cmd
import socket
import struct
import select
import requests
import xml.dom.minidom
import re
import traceback
import sys
import core.globals
import interface.utils
from interface.messages import print_error, print_help, print_info, print_warning, print_red, \
    print_success
            device_entry_pointer = self.enum_hosts[index][device_list_entries][device_display_name] = {}
            device_entry_pointer['fullName'] = device_type_name

            # Parse out all the device tags for that device
            for tag in device_tags:
                try:
                    device_entry_pointer[tag] = str(device.getElementsByTagName(tag)[0].childNodes[0].data)
                except Exception as e:
                    if self.verbose:
                        print_error('Device', device_entry_pointer['fullName'], 'does not have a', tag)
                    continue
            # Get a list of all services for this device listing
            self.parse_service_list(device, device_entry_pointer, index)

        return

        # Display all info for a given host

    def show_complete_host_info(self, index, fp=False):
        # na = 'N/A'
        service_keys = ['controlURL', 'eventSubURL', 'serviceId', 'SCPDURL', 'fullName']
        if not fp:
            fp = sys.stdout

        if index < 0 or index >= len(self.enum_hosts):
            fp.write('Specified host does not exist...\n')
            return
        try:
            host_info = self.enum_hosts[index]
            if not host_info['dataComplete']:

# Path: interface/messages.py
# def print_error(*args, **kwargs):
#     print(Color.RED + Color.BOLD + "[-]" + Color.ENDC, *args, **kwargs)
# 
# def print_help(*args, **kwargs):
#     print(Color.PURPLE + Color.BOLD + "[?]" + Color.ENDC, *args, **kwargs)
# 
# def print_info(*args, **kwargs):
#     print(Color.BLUE + Color.BOLD + "[*]" + Color.ENDC, *args, **kwargs)
# 
# def print_warning(*args, **kwargs):
#     print(Color.YELLOW + Color.BOLD + "[!]" + Color.ENDC, *args, **kwargs)
# 
# def print_red(msg):
#     print(Color.RED + msg + Color.ENDC)
# 
# def print_success(*args, **kwargs):
#     print(Color.GREEN + Color.BOLD + "[+]" + Color.ENDC, *args, **kwargs)


# Path: modules/misc/generic/upnp_console.py
import core.io
import time
import base64
import cmd
import socket
import struct
import select
import requests
import xml.dom.minidom
import re
import traceback
import sys
import core.globals
import interface.utils
from interface.messages import print_error, print_help, print_info, print_warning, print_red, \
    print_success

            device_entry_pointer = self.enum_hosts[index][device_list_entries][device_display_name] = {}
            device_entry_pointer['fullName'] = device_type_name

            # Parse out all the device tags for that device
            for tag in device_tags:
                try:
                    device_entry_pointer[tag] = str(device.getElementsByTagName(tag)[0].childNodes[0].data)
                except Exception as e:
                    if self.verbose:
                        print_error('Device', device_entry_pointer['fullName'], 'does not have a', tag)
                    continue
            # Get a list of all services for this device listing
            self.parse_service_list(device, device_entry_pointer, index)

        return

        # Display all info for a given host

    def show_complete_host_info(self, index, fp=False):
        # na = 'N/A'
        service_keys = ['controlURL', 'eventSubURL', 'serviceId', 'SCPDURL', 'fullName']
        if not fp:
            fp = sys.stdout

        if index < 0 or index >= len(self.enum_hosts):
            fp.write('Specified host does not exist...\n')
            return
        try:
            host_info = self.enum_hosts[index]
            if not host_info['dataComplete']:

                print_warning(