Updated message flags.

This commit is contained in:
Jakob Friedl
2025-07-23 13:56:43 +02:00
parent 0f065f41a2
commit cb16a9c571
4 changed files with 4 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ proc createHeartbeat*(config: AgentConfig): Heartbeat =
magic: MAGIC,
version: VERSION,
packetType: cast[uint8](MSG_HEARTBEAT),
flags: cast[uint16](FLAG_PLAINTEXT),
flags: cast[uint16](FLAG_ENCRYPTED),
size: 0'u32,
agentId: uuidToUint32(config.agentId),
seqNr: 0'u64,

View File

@@ -199,7 +199,7 @@ proc collectAgentMetadata*(config: AgentConfig): AgentRegistrationData =
magic: MAGIC,
version: VERSION,
packetType: cast[uint8](MSG_REGISTER),
flags: cast[uint16](FLAG_PLAINTEXT),
flags: cast[uint16](FLAG_ENCRYPTED),
size: 0'u32,
agentId: uuidToUint32(config.agentId),
seqNr: 1'u64, # TODO: Implement sequence tracking

View File

@@ -10,7 +10,7 @@ proc createTaskResult*(task: Task, status: StatusType, resultType: ResultType, r
magic: MAGIC,
version: VERSION,
packetType: cast[uint8](MSG_RESPONSE),
flags: cast[uint16](FLAG_PLAINTEXT),
flags: cast[uint16](FLAG_ENCRYPTED),
size: 0'u32,
agentId: task.header.agentId,
seqNr: 1'u64,

View File

@@ -102,7 +102,7 @@ proc parseTask*(cq: Conquest, command: Command, arguments: seq[string]): Task =
taskHeader.magic = MAGIC
taskHeader.version = VERSION
taskHeader.packetType = cast[uint8](MSG_TASK)
taskHeader.flags = cast[uint16](FLAG_PLAINTEXT)
taskHeader.flags = cast[uint16](FLAG_ENCRYPTED)
taskHeader.size = 0'u32
taskHeader.agentId = uuidtoUint32(cq.interactAgent.agentId)
taskHeader.seqNr = 1'u64 # TODO: Implement sequence tracking