diff options
| author | Jeff Carr <[email protected]> | 2024-04-15 05:06:14 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-04-15 05:06:14 -0500 |
| commit | 42ca387a49857c6a179650c4296384ce74c1e3d1 (patch) | |
| tree | 2084a707cfcbdb2b34a870a7e8a5474b5b737c53 /digStatusWindow.go | |
| parent | 46de348eb26cae3558ca943b46472a8cdc3e3a96 (diff) | |
start automatically fixing the problems
Diffstat (limited to 'digStatusWindow.go')
| -rw-r--r-- | digStatusWindow.go | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/digStatusWindow.go b/digStatusWindow.go index e62be77..5fc375a 100644 --- a/digStatusWindow.go +++ b/digStatusWindow.go @@ -204,7 +204,7 @@ func (ds *digStatus) set(a any, s string) { } func (ds *digStatus) updateDnsStatus() { - var cmd, out string + // var cmd, out string var ipv4, ipv6 bool log.Info("updateDnsStatus() START") @@ -252,15 +252,13 @@ func (ds *digStatus) updateDnsStatus() { ds.setIPv6status("Need VPN") } - cmd = "dig +noall +answer www.wit.com A" - out = shell.RunCapture(cmd) - log.Log(DNS, "makeDnsStatusGrid() dig", out) - me.digStatus.set(ds.DnsDigUDP, out) + r := shell.Output("", []string{"dig", "+noall", "+answer", "www.wit.com", "A"}) + log.Log(DNS, "makeDnsStatusGrid() dig", r.Stdout()) + me.digStatus.set(ds.DnsDigUDP, r.Stdout()) - cmd = "dig +noall +answer www.wit.com AAAA" - out = shell.RunCapture(cmd) - log.Log(DNS, "makeDnsStatusGrid() dig", out) - me.digStatus.set(ds.DnsDigTCP, out) + r = shell.Output("", []string{"dig", "+noall", "+answer", "www.wit.com", "AAAA"}) + log.Log(DNS, "makeDnsStatusGrid() dig", r.Stdout()) + me.digStatus.set(ds.DnsDigTCP, r.Stdout()) /* g2.NewButton("dig +trace", func () { @@ -283,23 +281,14 @@ func (ds *digStatus) makeHttpStatusGrid() { } func (ds *digStatus) makeDnsStatusGrid() { - var cmd, out string group := ds.details.NewGroup("dig results") grid := group.NewGrid("LookupStatus", 2, 2) - cmd = "dig +noall +answer go.wit.com A" - grid.NewLabel(cmd) + grid.NewLabel("dig +noall +answer go.wit.com A") ds.DnsDigUDP = grid.NewLabel("?") - out = shell.RunCapture(cmd) - log.Log(DNS, "makeDnsStatusGrid() dig", out) - me.digStatus.set(ds.DnsDigUDP, out) - cmd = "dig +noall +answer go.wit.com AAAA" - grid.NewLabel(cmd) + grid.NewLabel("dig +noall +answer go.wit.com AAAA") ds.DnsDigTCP = grid.NewLabel("?") - out = shell.RunCapture(cmd) - log.Log(DNS, "makeDnsStatusGrid() dig", out) - me.digStatus.set(ds.DnsDigTCP, out) group.Pad() grid.Pad() |
