mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
syntax fixes
This commit is contained in:
parent
c3baf05b20
commit
9f9c124f9f
@ -41,14 +41,13 @@ 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]"
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user