Files
Mike Cohen 5ef9e85391 Secrets can now be inherited from the root org (#4524)
Also some minor bug fixes:
- ACE editor: disable web workers to prevent invalid http request
(#4006)

- Fixed some bugs in artifacts: Windows.Forensics.Prefetch and
Windows.System.TaskScheduler

- Offline collector now uses Hostname in default name rather than FQDN.
2025-11-04 16:01:49 +10:00

45 lines
1.3 KiB
Go

package executor
import (
"context"
config_proto "www.velocidex.com/golang/velociraptor/config/proto"
"www.velocidex.com/golang/velociraptor/constants"
crypto_proto "www.velocidex.com/golang/velociraptor/crypto/proto"
"www.velocidex.com/golang/velociraptor/utils"
)
// This request asks the client to report progress on all currently
// running flows. This is needed for the server to identify when a
// client has restarted or crashed and reap any flows that are still
// outstanding.
func (self *ClientExecutor) ProcessStatRequest(
ctx context.Context,
config_obj *config_proto.Config, req *crypto_proto.VeloMessage) {
for _, flow_id := range req.FlowStatsRequest.FlowId {
flow_context, err := self.flow_manager.Get(flow_id)
var stats *crypto_proto.VeloMessage
if utils.IsNotFound(err) {
stats = &crypto_proto.VeloMessage{
SessionId: flow_id,
RequestId: constants.STATS_SINK,
FlowStats: &crypto_proto.FlowStats{
FlowComplete: true,
QueryStatus: []*crypto_proto.VeloStatus{{
Status: crypto_proto.VeloStatus_UNKNOWN_FLOW,
ErrorMessage: "Flow not known - maybe the client crashed?",
}},
},
}
} else {
stats = flow_context.GetStats()
}
// Make sure responses get there immediately.
stats.Urgent = true
self.SendToServer(stats)
}
}