MCPcopy Create free account
hub / github.com/Adaptix-Framework/AdaptixC2 / reg

Method reg

AdaptixClient/Source/Client/AxScript/BridgeEvent.cpp:10–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8BridgeEvent::~BridgeEvent() {}
9
10void BridgeEvent::reg(const QString &event, const QString &type, const QJSValue &handler, const QJSValue &agents, const QJSValue &os, const QJSValue &listeners, const QString &event_id)
11{
12 if (!handler.isCallable()) {
13 Q_EMIT scriptError(type + " -> handler is not Callable");
14 return;
15 }
16
17 if (!AxScriptUtils::isValidNonEmptyArray(agents)) {
18 Q_EMIT scriptError(type + " -> agents is undefined or empty");
19 return;
20 }
21
22 QSet<QString> list_agents = AxScriptUtils::jsArrayToStringSet(agents);
23 QSet<QString> list_os = AxScriptUtils::jsArrayToStringSet(os);
24 QSet<QString> list_listeners = AxScriptUtils::jsArrayToStringSet(listeners);
25
26 this->scriptEngine->registerEvent(event, handler, nullptr, list_agents, list_os, list_listeners, event_id);
27}
28
29
30

Callers 5

on_filebrowser_disksMethod · 0.95
on_filebrowser_listMethod · 0.95
on_filebrowser_uploadMethod · 0.95
on_new_agentMethod · 0.95

Calls 1

registerEventMethod · 0.80

Tested by

no test coverage detected