mirror of
https://github.com/bettercap/bettercap
synced 2025-07-08 05:51:37 -07:00
refact: refactored to use islazy and updated deps
This commit is contained in:
parent
a2b3ee79fb
commit
d070445225
238 changed files with 12662 additions and 1586 deletions
|
@ -148,13 +148,13 @@ func (f PfFirewall) EnableRedirection(r *Redirection, enabled bool) error {
|
|||
lines := ""
|
||||
scanner := bufio.NewScanner(fd)
|
||||
for scanner.Scan() {
|
||||
line := core.Trim(scanner.Text())
|
||||
line := str.Trim(scanner.Text())
|
||||
if line != rule {
|
||||
lines += line + "\n"
|
||||
}
|
||||
}
|
||||
|
||||
if core.Trim(lines) == "" {
|
||||
if str.Trim(lines) == "" {
|
||||
os.Remove(f.filename)
|
||||
f.enable(false)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue