executeDownload downloads a file from the beacon
(ctx context.Context, client *csclient.Client, beaconID string, action Action)
| 1073 | |
| 1074 | // executeDownload downloads a file from the beacon |
| 1075 | func (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 |
| 1090 | func (e *Executor) executeBOFPackCustom(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
no test coverage detected