--- PowerShell & .NET --- executePowerShellImport imports a PowerShell script
(ctx context.Context, client *csclient.Client, beaconID string, action Action)
| 278 | |
| 279 | // executePowerShellImport imports a PowerShell script |
| 280 | func (e *Executor) executePowerShellImport(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
| 281 | scriptPath, ok := action.Parameters["script"].(string) |
| 282 | if !ok { |
| 283 | return "", fmt.Errorf("script parameter required for powershell_import") |
| 284 | } |
| 285 | |
| 286 | resp, err := client.PowerShellImport(ctx, beaconID, scriptPath) |
| 287 | if err != nil { |
| 288 | return "", err |
| 289 | } |
| 290 | return e.waitForOutput(ctx, client, resp.TaskID) |
| 291 | } |
| 292 | |
| 293 | // executePowerPick executes unmanaged PowerShell (spawn) |
| 294 | func (e *Executor) executePowerPick(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
no test coverage detected