AxEvent type
AdaptixClient generates events for various situations. To register a handler for a specific event, there are functions from the event namespace. Several handlers can be connected to one event.
To assign a handler to a specific event use the function
void event.on_EVENT_TYPE(handler(){}, string[] agents, string[] os = [], string[] listeners = [], string event_id = "");handler- a handler that will be triggered when the event occurs.agents- an array of strings containing the names of agents for which the event will be triggered. Available options are "beacon", "gopher", etc.os- an array of strings with the names of the operating systems for which the event will be triggered. The following options are available: "windows", "linux", "macos". If an empty array[]is specified, the command group will be registered for all operating systems.listeners- An array of strings with the names of registered listeners for which the event will be triggered. The following options are available: "BeaconHTTP", "BeaconSMB", etc. If an empty array [] is specified, the command group will be registered for all listeners.event_id- id forhandler
You can remove a handler that has an id set.
void event.remove(string event_id);on_new_agent
This event occurs every time a new agent registers.
void event.on_new_agent(handler(){}, string[] agents, string[] os = [], string[] listeners = [], string event_id = "");This event must have a handler assigned in the following format.
function handler(string id);id- agent ID
Example
on_filebrowser_disks
This event occurs when the user clicks the Disks button in the File Browser.
This event must have a handler assigned in the following format.
id- agent ID
Example
on_filebrowser_list
This event occurs whenever the user requests a list of files in the File Browser.
This event must have a handler assigned in the following format.
id- agent IDpath- current path in File Browser
on_filebrowser_upload
This event occurs whenever the user requests a list of processes in the Process Browser.
This event must have a handler assigned in the following format.
id- agent IDpath- current path in File Browserfilepath- path to the local file to upload
Example
on_processbrowser_list
This event occurs when a user uploads a file in a File Browser.
This event must have a handler assigned in the following format.
id- agent ID
Example
on_disconnect
This event occurs when a client disconnects from the server.
This event must have a handler assigned in the following format.
Example
on_ready
This event occurs when the client has finished synchronizing with the server.
This event must have a handler assigned in the following format.
Example
on_interval
The handler will be executed every n seconds. The method returns the ID with which the event was registered.
This event must have a handler assigned in the following format.
Example
on_timeout
The handler will be executed once in n seconds. The method returns the ID with which the event was registered.
This event must have a handler assigned in the following format.
Example
list
The method returns a list of IDs of all registered handlers.
Example
remove
The method removes handler for the event whose ID is provided.
Example

Last updated