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

Method executeRegQueryValue

workflow/executor_spawn.go:536–555  ·  view source on GitHub ↗

executeRegQueryValue queries a registry subkey value

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

Source from the content-addressed store, hash-verified

534
535// executeRegQueryValue queries a registry subkey value
536func (e *Executor) executeRegQueryValue(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) {
537 arch, ok := action.Parameters["arch"].(string)
538 if !ok {
539 return "", fmt.Errorf("arch parameter required for reg_queryv")
540 }
541 path, ok := action.Parameters["path"].(string)
542 if !ok {
543 return "", fmt.Errorf("path parameter required for reg_queryv")
544 }
545 subkey, ok := action.Parameters["subkey"].(string)
546 if !ok {
547 return "", fmt.Errorf("subkey parameter required for reg_queryv")
548 }
549
550 resp, err := client.RegQueryValue(ctx, beaconID, arch, path, subkey)
551 if err != nil {
552 return "", err
553 }
554 return e.waitForOutput(ctx, client, resp.TaskID)
555}

Callers 1

executeActionMethod · 0.95

Calls 1

waitForOutputMethod · 0.95

Tested by

no test coverage detected