MCPcopy
hub / github.com/hardentools/hardentools / executeCommand

Function executeCommand

utils.go:106–113  ·  view source on GitHub ↗

Helper method for executing cmd commands (does not open cmd window).

(cmd string, args ...string)

Source from the content-addressed store, hash-verified

104
105// Helper method for executing cmd commands (does not open cmd window).
106func executeCommand(cmd string, args ...string) (string, error) {
107 var out []byte
108 command := exec.Command(cmd, args...)
109 command.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
110 out, err := command.CombinedOutput()
111
112 return string(out), err
113}
114
115// checkStatus checks status of hardentools registry key
116// (that tells if user environment is hardened / not hardened).

Callers 6

IsHardenedMethod · 0.85
AddMPPreferenceFunction · 0.85
debugOutputFunction · 0.85
HardenMethod · 0.85
IsHardenedMethod · 0.85

Calls

no outgoing calls

Tested by 1

debugOutputFunction · 0.68