MCPcopy Create free account
hub / github.com/Xenov-X/csbot / executeDownload

Method executeDownload

workflow/executor.go:1075–1087  ·  view source on GitHub ↗

executeDownload downloads a file from the beacon

(ctx context.Context, client *csclient.Client, beaconID string, action Action)

Source from the content-addressed store, hash-verified

1073
1074// executeDownload downloads a file from the beacon
1075func (e *Executor) executeDownload(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) {
1076 remotePath, ok := action.Parameters["remote_path"].(string)
1077 if !ok {
1078 return "", fmt.Errorf("remote_path parameter required for download")
1079 }
1080
1081 resp, err := client.Download(ctx, beaconID, remotePath)
1082 if err != nil {
1083 return "", err
1084 }
1085
1086 return e.waitForOutput(ctx, client, resp.TaskID)
1087}
1088
1089// executeBOFPackCustom executes a BOF with custom packed arguments
1090func (e *Executor) executeBOFPackCustom(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) {

Callers 1

executeActionMethod · 0.95

Calls 1

waitForOutputMethod · 0.95

Tested by

no test coverage detected