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

@@ -138,7 +138,7 @@ proc httpPost*(request: Request) =
headers.add((header, value.getStringValue()))
if cast[PacketType](header.packetType) == MSG_REGISTER:
if not register(string.toBytes(request.body)):
if not register(string.toBytes(request.body), request.remoteAddress):
request.respond(400, body = "")
return