def options(self, context, module_options):
        """
        ACTION (mandatory)      Performs one of the following actions, specified by the user:
                                  ADD           insert a new malicious trigger into KEEPASS_CONFIG_PATH's specified file
                                  CHECK         check if a malicious trigger is currently set in KEEPASS_CONFIG_PATH's
                                                specified file
                                  RESTART       restart KeePass using a Windows service (used to force trigger reload),
                                                if multiple KeePass process are running, rely on USER option
                                  POLL          search for EXPORT_NAME file in EXPORT_PATH folder
                                                (until found, or manually exited by the user)
                                  CLEAN         remove malicious trigger from KEEPASS_CONFIG_PATH as well as database
                                                export files from EXPORT_PATH
                                  ALL           performs ADD, CHECK, RESTART, POLL, CLEAN actions one after the other

        KEEPASS_CONFIG_PATH     Path of the remote KeePass configuration file where to add a malicious trigger
                                (used by ADD, CHECK and CLEAN actions)
        USER                    Targeted user running KeePass, used to restart the appropriate process
                                (used by RESTART action)

        EXPORT_NAME             Name fo the database export file, default: export.xml
        EXPORT_PATH             Path where to export the KeePass database in cleartext
                                default: C:\\Users\\Public, %APPDATA% works well too for user permissions

        PSH_EXEC_METHOD         Powershell execution method, may avoid detections depending on the AV/EDR in use
                                (while no 'malicious' command is executed):
                                  ENCODE        run scripts through encoded oneliners
                                  PS1           run scripts through a file dropped in C:\\Windows\\Temp (default)

        Not all variables used by the module are available as options (ex: trigger name, temp folder path, etc.),
        but they can still be easily edited in the module __init__ code if needed
        """

        if "ACTION" in module_options:
            if module_options["ACTION"] not in [
                "ADD",
                "CHECK",
                "RESTART",
                "SINGLE_POLL",
                "POLL",
                "CLEAN",
                "ALL",
            ]:
                context.log.fail("Unrecognized action, use --options to list available parameters")
                exit(1)
            else:
                self.action = module_options["ACTION"]
        else:
            context.log.fail("Missing ACTION option, use --options to list available parameters")
            exit(1)

        if "KEEPASS_CONFIG_PATH" in module_options:
            self.keepass_config_path = module_options["KEEPASS_CONFIG_PATH"]

        if "USER" in module_options:
            self.keepass_user = module_options["USER"]

        if "EXPORT_NAME" in module_options:
            self.export_name = module_options["EXPORT_NAME"]

        if "EXPORT_PATH" in module_options:
            self.export_path = module_options["EXPORT_PATH"]

        if "PSH_EXEC_METHOD" in module_options:
            if module_options["PSH_EXEC_METHOD"] not in ["ENCODE", "PS1"]:
                context.log.fail("Unrecognized powershell execution method, use --options to list available parameters")
                exit(1)
            else:
                self.powershell_exec_method = module_options["PSH_EXEC_METHOD"]

        ACTION (mandatory)      Performs one of the following actions, specified by the user:
                                  ADD           insert a new malicious trigger into KEEPASS_CONFIG_PATH's specified file
                                  CHECK         check if a malicious trigger is currently set in KEEPASS_CONFIG_PATH's
                                                specified file
                                  RESTART       restart KeePass using a Windows service (used to force trigger reload),
                                                if multiple KeePass process are running, rely on USER option
                                  POLL          search for EXPORT_NAME file in EXPORT_PATH folder
                                                (until found, or manually exited by the user)
                                  CLEAN         remove malicious trigger from KEEPASS_CONFIG_PATH as well as database
                                                export files from EXPORT_PATH
                                  ALL           performs ADD, CHECK, RESTART, POLL, CLEAN actions one after the other

        KEEPASS_CONFIG_PATH     Path of the remote KeePass configuration file where to add a malicious trigger
                                (used by ADD, CHECK and CLEAN actions)
        USER                    Targeted user running KeePass, used to restart the appropriate process
                                (used by RESTART action)

        EXPORT_NAME             Name fo the database export file, default: export.xml
        EXPORT_PATH             Path where to export the KeePass database in cleartext
                                default: C:\Users\Public, %APPDATA% works well too for user permissions

        PSH_EXEC_METHOD         Powershell execution method, may avoid detections depending on the AV/EDR in use
                                (while no 'malicious' command is executed):
                                  ENCODE        run scripts through encoded oneliners
                                  PS1           run scripts through a file dropped in C:\Windows\Temp (default)

        Not all variables used by the module are available as options (ex: trigger name, temp folder path, etc.),
        but they can still be easily edited in the module __init__ code if needed
        
cme/modules/keepass_trigger.py