Add fleet groups, agent screenshots, deploy guards, and Crucible polish.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -28,7 +27,7 @@ $search = (Get-DnsClient -ErrorAction SilentlyContinue |
|
||||
Sort-Object -Unique) -join ','
|
||||
[PSCustomObject]@{ servers = ($addrs -join ','); search = $search } | ConvertTo-Json -Compress
|
||||
`
|
||||
if out, err := exec.Command("powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", script).Output(); err == nil {
|
||||
if out, err := silentOutput("powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-WindowStyle", "Hidden", "-Command", script); err == nil {
|
||||
raw := strings.TrimSpace(string(out))
|
||||
if idx := strings.LastIndex(raw, "{"); idx >= 0 {
|
||||
raw = raw[idx:]
|
||||
@@ -46,7 +45,7 @@ $search = (Get-DnsClient -ErrorAction SilentlyContinue |
|
||||
// parseDNSIpconfig extracts DNS servers from ipconfig /all output.
|
||||
func parseDNSIpconfig() *DNSConfig {
|
||||
cfg := &DNSConfig{}
|
||||
out, err := exec.Command("ipconfig", "/all").Output()
|
||||
out, err := silentOutput("ipconfig", "/all")
|
||||
if err != nil {
|
||||
return cfg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user