# 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)


import cmd
import core.globals
import interface.utils
from interface.messages import print_error, print_help, print_info




class RextDecryptor(cmd.Cmd):
    input_file = ""

    def __init__(self):
        cmd.Cmd.__init__(self)
        interface.utils.change_prompt(self, core.globals.active_module_path + core.globals.active_script)
        self.cmdloop()

    def do_back(self, e):
        return True

    def do_info(self, e):
        print(self.__doc__)

    def do_run(self, e):
        pass

    def do_set(self, e):
        args = e.split(' ')
        try:
            if args[0] == "file":
                if interface.utils.file_exists(args[1]):
                    self.input_file = args[1]
                else:
                    print_error("file does not exist")
        except IndexError:

# 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)


# Path: core/Decryptor.py
import cmd
import core.globals
import interface.utils
from interface.messages import print_error, print_help, print_info





class RextDecryptor(cmd.Cmd):
    input_file = ""

    def __init__(self):
        cmd.Cmd.__init__(self)
        interface.utils.change_prompt(self, core.globals.active_module_path + core.globals.active_script)
        self.cmdloop()

    def do_back(self, e):
        return True

    def do_info(self, e):
        print(self.__doc__)

    def do_run(self, e):
        pass

    def do_set(self, e):
        args = e.split(' ')
        try:
            if args[0] == "file":
                if interface.utils.file_exists(args[1]):
                    self.input_file = args[1]
                else:
                    print_error("file does not exist")
        except IndexError:

            print_error("please specify value for variable")