Added remote address and modules to agent structure. Help command now only shows commands for which the agent has been configured.

This commit is contained in:
Jakob Friedl
2025-10-02 10:25:37 +02:00
parent fbe85493b2
commit 5c0beb36ff
15 changed files with 92 additions and 77 deletions

View File

@@ -9,14 +9,16 @@ proc `%`*(agent: Agent): JsonNode =
result["username"] = %agent.username
result["hostname"] = %agent.hostname
result["domain"] = %agent.domain
result["ip"] = %agent.ip
result["ipInternal"] = %agent.ipInternal
result["ipExternal"] = %agent.ipExternal
result["os"] = %agent.os
result["process"] = %agent.process
result["pid"] = %agent.pid
result["elevated"] = %agent.elevated
result["sleep"] = %agent.sleep
result["firstCheckin"] = %agent.firstCheckin.toTime().toUnix()
result["latestCheckin"] = %agent.latestCheckin.toTime().toUnix()
result["modules"] = %agent.modules
result["firstCheckin"] = %agent.firstCheckin
result["latestCheckin"] = %agent.latestCheckin
proc `%`*(listener: Listener): JsonNode =
result = newJObject()