mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
Adding case insensitive match for netsh output
`isSuccess` originally matched on `OK` without checking the case of the output. Some windows builds output `Ok` as well.
This commit is contained in:
parent
a6e6c2fa3a
commit
5c991a58e3
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ func (f WindowsFirewall) IsForwardingEnabled() bool {
|
|||
}
|
||||
|
||||
func (f WindowsFirewall) isSuccess(output string) bool {
|
||||
if trimmed := core.Trim(output); trimmed == "" || strings.Contains(trimmed, "OK") == true {
|
||||
if trimmed := core.Trim(strings.ToLower(output)); trimmed == "" || strings.Contains(trimmed, "ok") == true {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue