1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

syntax fixes

This commit is contained in:
TheRedSpy15
2018-10-14 20:55:27 -04:00
committed by GitHub
parent c3baf05b20
commit 9f9c124f9f

View File

@@ -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]"
}
}