Moved task parsing logic to the client to be able to support dotnet/bof commands when operating from a different machine than the team server. Disabled sequence tracking due to issues.

This commit is contained in:
Jakob Friedl
2025-09-30 10:04:29 +02:00
parent 13a245ebf2
commit 039c857027
14 changed files with 94 additions and 92 deletions

View File

@@ -5,6 +5,7 @@ import ./handlers
import ../globals
import ../core/logger
import ../../common/[types, utils, serialize, profile]
import ../websocket
# Not Found
proc error404*(request: Request) =
@@ -73,7 +74,7 @@ proc httpGet*(request: Request) =
try:
var responseBytes: seq[byte]
let tasks: seq[seq[byte]] = getTasks(heartbeat)
let (agentId, tasks) = getTasks(heartbeat)
if tasks.len <= 0:
request.respond(200, body = "")
@@ -107,6 +108,7 @@ proc httpGet*(request: Request) =
request.respond(200, headers = headers, body = prefix & response & suffix)
# Notify operator that agent collected tasks
cq.client.sendConsoleItem(agentId, LOG_INFO, fmt"{$response.len} bytes sent.")
cq.info(fmt"{$response.len} bytes sent.")
except CatchableError: