--- Registry --- executeRegQuery queries a registry key
(ctx context.Context, client *csclient.Client, beaconID string, action Action)
| 516 | |
| 517 | // executeRegQuery queries a registry key |
| 518 | func (e *Executor) executeRegQuery(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
| 519 | arch, ok := action.Parameters["arch"].(string) |
| 520 | if !ok { |
| 521 | return "", fmt.Errorf("arch parameter required for reg_query") |
| 522 | } |
| 523 | path, ok := action.Parameters["path"].(string) |
| 524 | if !ok { |
| 525 | return "", fmt.Errorf("path parameter required for reg_query") |
| 526 | } |
| 527 | |
| 528 | resp, err := client.RegQuery(ctx, beaconID, arch, path) |
| 529 | if err != nil { |
| 530 | return "", err |
| 531 | } |
| 532 | return e.waitForOutput(ctx, client, resp.TaskID) |
| 533 | } |
| 534 | |
| 535 | // executeRegQueryValue queries a registry subkey value |
| 536 | func (e *Executor) executeRegQueryValue(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
no test coverage detected