# 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_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)
# 
# Path: interface/utils.py
# def validate_mac(mac):
#     xr = re.compile(r'^([a-fA-F0-9]{2}([:-]?)[a-fA-F0-9]{2}(\2[a-fA-F0-9]{2}){4})$')
#     rr = xr.match(mac)
#     if rr:
#         return True
#     else:
#         return False
# 
# def lookup_mac(mac):
#     mac = mac.replace(":", "")
#     mac = mac.replace("-", "")
#     cursor = core.globals.ouidb_conn.cursor()
#     cursor.execute("SELECT name FROM oui WHERE oui == ?", [mac[:6]])
#     company_name = (cursor.fetchone())
#     if company_name is not None:
#         company_name = company_name[0]
#         return "(" + company_name + ")"
#     else:
#         return "(Unknown)"


import core.Misc
import core.io
from interface.messages import print_success, print_error, print_help, print_info
from interface.utils import validate_mac, lookup_mac
        elif offset == "7":
            part3 = "E"

        if last == "28":
            part4 = "03"
        elif last == "00":
            part4 = "0D"
        elif last == "AC":
            part4 = "1A"
        elif last == "08":
            part4 = "05"
        elif last == "10":
            part4 = "0E"
        elif last == "20":
            part4 = "1F"
        elif last == "80":
            part4 = "06"
        elif last == "CC":
            part4 = "12"
        elif last == "70":
            part4 = "20"
        elif last == "E0":
            part4 = "0C"
        elif last == "D4":
            part4 = "35"
        elif last == "F8":
            part4 = "21"
        elif last == "48":
            part4 = "24"
        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_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)
# 
# Path: interface/utils.py
# def validate_mac(mac):
#     xr = re.compile(r'^([a-fA-F0-9]{2}([:-]?)[a-fA-F0-9]{2}(\2[a-fA-F0-9]{2}){4})$')
#     rr = xr.match(mac)
#     if rr:
#         return True
#     else:
#         return False
# 
# def lookup_mac(mac):
#     mac = mac.replace(":", "")
#     mac = mac.replace("-", "")
#     cursor = core.globals.ouidb_conn.cursor()
#     cursor.execute("SELECT name FROM oui WHERE oui == ?", [mac[:6]])
#     company_name = (cursor.fetchone())
#     if company_name is not None:
#         company_name = company_name[0]
#         return "(" + company_name + ")"
#     else:
#         return "(Unknown)"


# Path: modules/misc/huawei/hg8245_mac2wpa.py
import core.Misc
import core.io
from interface.messages import print_success, print_error, print_help, print_info
from interface.utils import validate_mac, lookup_mac

        elif offset == "7":
            part3 = "E"

        if last == "28":
            part4 = "03"
        elif last == "00":
            part4 = "0D"
        elif last == "AC":
            part4 = "1A"
        elif last == "08":
            part4 = "05"
        elif last == "10":
            part4 = "0E"
        elif last == "20":
            part4 = "1F"
        elif last == "80":
            part4 = "06"
        elif last == "CC":
            part4 = "12"
        elif last == "70":
            part4 = "20"
        elif last == "E0":
            part4 = "0C"
        elif last == "D4":
            part4 = "35"
        elif last == "F8":
            part4 = "21"
        elif last == "48":
            part4 = "24"
        else:

            print_error("not possible to generate WPA key from MAC")