Updated message flags.
This commit is contained in:
@@ -8,7 +8,7 @@ proc createHeartbeat*(config: AgentConfig): Heartbeat =
|
|||||||
magic: MAGIC,
|
magic: MAGIC,
|
||||||
version: VERSION,
|
version: VERSION,
|
||||||
packetType: cast[uint8](MSG_HEARTBEAT),
|
packetType: cast[uint8](MSG_HEARTBEAT),
|
||||||
flags: cast[uint16](FLAG_PLAINTEXT),
|
flags: cast[uint16](FLAG_ENCRYPTED),
|
||||||
size: 0'u32,
|
size: 0'u32,
|
||||||
agentId: uuidToUint32(config.agentId),
|
agentId: uuidToUint32(config.agentId),
|
||||||
seqNr: 0'u64,
|
seqNr: 0'u64,
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ proc collectAgentMetadata*(config: AgentConfig): AgentRegistrationData =
|
|||||||
magic: MAGIC,
|
magic: MAGIC,
|
||||||
version: VERSION,
|
version: VERSION,
|
||||||
packetType: cast[uint8](MSG_REGISTER),
|
packetType: cast[uint8](MSG_REGISTER),
|
||||||
flags: cast[uint16](FLAG_PLAINTEXT),
|
flags: cast[uint16](FLAG_ENCRYPTED),
|
||||||
size: 0'u32,
|
size: 0'u32,
|
||||||
agentId: uuidToUint32(config.agentId),
|
agentId: uuidToUint32(config.agentId),
|
||||||
seqNr: 1'u64, # TODO: Implement sequence tracking
|
seqNr: 1'u64, # TODO: Implement sequence tracking
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ proc createTaskResult*(task: Task, status: StatusType, resultType: ResultType, r
|
|||||||
magic: MAGIC,
|
magic: MAGIC,
|
||||||
version: VERSION,
|
version: VERSION,
|
||||||
packetType: cast[uint8](MSG_RESPONSE),
|
packetType: cast[uint8](MSG_RESPONSE),
|
||||||
flags: cast[uint16](FLAG_PLAINTEXT),
|
flags: cast[uint16](FLAG_ENCRYPTED),
|
||||||
size: 0'u32,
|
size: 0'u32,
|
||||||
agentId: task.header.agentId,
|
agentId: task.header.agentId,
|
||||||
seqNr: 1'u64,
|
seqNr: 1'u64,
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ proc parseTask*(cq: Conquest, command: Command, arguments: seq[string]): Task =
|
|||||||
taskHeader.magic = MAGIC
|
taskHeader.magic = MAGIC
|
||||||
taskHeader.version = VERSION
|
taskHeader.version = VERSION
|
||||||
taskHeader.packetType = cast[uint8](MSG_TASK)
|
taskHeader.packetType = cast[uint8](MSG_TASK)
|
||||||
taskHeader.flags = cast[uint16](FLAG_PLAINTEXT)
|
taskHeader.flags = cast[uint16](FLAG_ENCRYPTED)
|
||||||
taskHeader.size = 0'u32
|
taskHeader.size = 0'u32
|
||||||
taskHeader.agentId = uuidtoUint32(cq.interactAgent.agentId)
|
taskHeader.agentId = uuidtoUint32(cq.interactAgent.agentId)
|
||||||
taskHeader.seqNr = 1'u64 # TODO: Implement sequence tracking
|
taskHeader.seqNr = 1'u64 # TODO: Implement sequence tracking
|
||||||
|
|||||||
Reference in New Issue
Block a user