Added documentation.
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
# Conquest Agents
|
||||
|
||||
The `Monarch` agent is designed to run primarily on Windows. For cross-compilation from UNIX, use:
|
||||
|
||||
```
|
||||
./build.sh
|
||||
```
|
||||
@@ -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):
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user