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


import requests
import requests.exceptions
import bs4
import core.Harvester
import interface.utils
from interface.messages import print_success, print_error, print_info, print_help
        print_info("Prints current value of username")

    def do_username(self, e):
        print_info(self.username)

    def do_run(self, e):
        try:
            print_info("Connecting to:", self.host)
            auth = (self.username, self.password)
            response = requests.get("http://"+self.host+"/basic/home_wan.htm", auth=auth, timeout=60)
            # headers, body = http.request("http://"+self.target+"/basic/home_wan.htm")
            if response.status_code == 200:
                print_success("Authentication successful")
                ppp_credentials = self.fetch_ppp(response.text)
                print_success("PPPoE/PPPoA Username:", ppp_credentials[0])
                print_success("PPPoE/PPPoA Password", ppp_credentials[1])
                response = requests.get("http://"+self.host+"/basic/home_wlan.htm", auth=auth, timeout=60)
                if response.status_code == 200:
                    wlan_credentials = self.fetch_wlan(response.text)
                    print_success("ESSID:", wlan_credentials[0])
                    print_success("PSK:", wlan_credentials[1])
                    for mac in wlan_credentials[2]:
                        print_success("MAC filter:", mac)
                else:
                    print_error("Status code:", response.status_code)
            elif response.status_code == 401:
                print_error("401 Authentication failed")
            elif response.status_code == 404:
                print_error("404 Page does not exists")
            else:

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


# Path: modules/harvesters/airlive/WT2000ARM.py
import requests
import requests.exceptions
import bs4
import core.Harvester
import interface.utils
from interface.messages import print_success, print_error, print_info, print_help

        print_info("Prints current value of username")

    def do_username(self, e):
        print_info(self.username)

    def do_run(self, e):
        try:
            print_info("Connecting to:", self.host)
            auth = (self.username, self.password)
            response = requests.get("http://"+self.host+"/basic/home_wan.htm", auth=auth, timeout=60)
            # headers, body = http.request("http://"+self.target+"/basic/home_wan.htm")
            if response.status_code == 200:
                print_success("Authentication successful")
                ppp_credentials = self.fetch_ppp(response.text)
                print_success("PPPoE/PPPoA Username:", ppp_credentials[0])
                print_success("PPPoE/PPPoA Password", ppp_credentials[1])
                response = requests.get("http://"+self.host+"/basic/home_wlan.htm", auth=auth, timeout=60)
                if response.status_code == 200:
                    wlan_credentials = self.fetch_wlan(response.text)
                    print_success("ESSID:", wlan_credentials[0])
                    print_success("PSK:", wlan_credentials[1])
                    for mac in wlan_credentials[2]:
                        print_success("MAC filter:", mac)
                else:
                    print_error("Status code:", response.status_code)
            elif response.status_code == 401:
                print_error("401 Authentication failed")
            elif response.status_code == 404:
                print_error("404 Page does not exists")
            else:

                print_error("Status code:", response.status_code)