executeRunNoOutput executes a command without blocking or returning output
(ctx context.Context, client *csclient.Client, beaconID string, action Action)
| 79 | |
| 80 | // executeRunNoOutput executes a command without blocking or returning output |
| 81 | func (e *Executor) executeRunNoOutput(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
| 82 | cmd, ok := action.Parameters["command"].(string) |
| 83 | if !ok { |
| 84 | return "", fmt.Errorf("command parameter required for run_no_output") |
| 85 | } |
| 86 | |
| 87 | resp, err := client.RunNoOutput(ctx, beaconID, cmd) |
| 88 | if err != nil { |
| 89 | return "", err |
| 90 | } |
| 91 | return e.fireAndForget(resp.TaskID, "execute (no output): "+cmd) |
| 92 | } |
| 93 | |
| 94 | // --- Privilege Elevation --- |
| 95 |
no test coverage detected