CmdChecker
Last updated
Last updated
The source code of CmdChecker is available on GitHub. CmdChecker is a helper application for checking AX scripts used in the Adaptix agent plugin and client extensions. CmdChecker parses the JSON file, processes the entered commands and outputs data that will be sent to the Adaptix server.
The JSON file must contain a json-array of commands. For example, consider the following file.
The Adaptix command structure has the following JSON parameters:
command - сonsole command name;
message - the message displayed in the console after entering the command;
description - description of the command;
example - example of command input;
args - command arguments.
For all commands from the file, a 'help' menu is automatically created.
The args parameter is a json-array of strings. Each string contains information about the parameter according to the following mask:
Type - is a required parameter that must have one of the following values: BOOL, INT, STRING, FILE. If the type is "FILE", then the path to the file will need to be specified in the console. In the received JSON data, the file contents will be encoded in base64.
Argument_name - is a required parameter that defines the name of the parameter.
If Argument_name is specified in brackets <>
, then the parameter is mandatory, and if in brackets []
, then it is optional.
The argument name can be specified as a simple string, or as a flag (starting with -
or /
) and a simple string.
For the BOOL type, the Argument_name is specified by a flag in square brackets []
.
Default_value - is an optional parameter that specifies the default value. To do this, Argument_name must be specified in brackets <>
.
Argument_description - is an optional parameter that describes the parameter for the 'help' menu.
An example of data that will be sent to the server:
A command can have subcommands defined. This parameter is a JSON array of commands.