From 9f9c124f9fcf4afb4b53bf777588d2f1fb0aa28e Mon Sep 17 00:00:00 2001 From: TheRedSpy15 Date: Sun, 14 Oct 2018 20:55:27 -0400 Subject: [PATCH] syntax fixes --- security/firewall.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/security/firewall.go b/security/firewall.go index ab8bdf3c..75e80a07 100644 --- a/security/firewall.go +++ b/security/firewall.go @@ -40,15 +40,14 @@ func FirewallStealthState() string { func firewallStateLinux() string { // might be very Ubuntu specific user, _ := user.Current() - - if (strings.Contains(user.Username, "root") { - cmd := exec.Command("ufw, "status") + + if strings.Contains(user.Username, "root") { + cmd := exec.Command("ufw", "status") + var o bytes.Buffer - cmd.Stdout = &o - if err := cmd.Run(); err != nil { - return "[red]NA[white] + return "[red]NA[white]" } if strings.Contains(o.String(), "active") { @@ -56,6 +55,8 @@ func firewallStateLinux() string { // might be very Ubuntu specific } else { return "[red]Disabled[white]" } + } else { + return "[red]NA[white]" } }