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
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 for handler
You can remove a handler that has an id set.
voidevent.remove(string event_id);
on_new_agent
This event occurs every time a new agent registers.