mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
e9b93b8586
commit
026ae2e5a5
2 changed files with 3 additions and 3 deletions
|
@ -181,7 +181,7 @@ func NewWiFiModule(s *session.Session) *WiFiModule {
|
||||||
freqs := []int{}
|
freqs := []int{}
|
||||||
|
|
||||||
if args[0] != "clear" {
|
if args[0] != "clear" {
|
||||||
log.Info("setting hopping channels to %s", args[0])
|
log.Debug("setting hopping channels to %s", args[0])
|
||||||
for _, s := range str.Comma(args[0]) {
|
for _, s := range str.Comma(args[0]) {
|
||||||
if ch, err := strconv.Atoi(s); err != nil {
|
if ch, err := strconv.Atoi(s); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -192,7 +192,7 @@ func NewWiFiModule(s *session.Session) *WiFiModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(freqs) == 0 {
|
if len(freqs) == 0 {
|
||||||
log.Info("resetting hopping channels")
|
log.Debug("resetting hopping channels")
|
||||||
if freqs, err = network.GetSupportedFrequencies(w.Session.Interface.Name()); err != nil {
|
if freqs, err = network.GetSupportedFrequencies(w.Session.Interface.Name()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,7 @@ func (w *WiFiModule) startDeauth(to net.HardwareAddr) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ap.IsOpen() && !w.doDeauthOpen() {
|
if ap.IsOpen() && !w.doDeauthOpen() {
|
||||||
logger("skipping deauth for open network %s (wifi.deauth.open is false)", ap.ESSID())
|
log.Debug("skipping deauth for open network %s (wifi.deauth.open is false)", ap.ESSID())
|
||||||
} else {
|
} else {
|
||||||
logger("deauthing client %s from AP %s (channel:%d encryption:%s)", client.String(), ap.ESSID(), ap.Channel(), ap.Encryption)
|
logger("deauthing client %s from AP %s (channel:%d encryption:%s)", client.String(), ap.ESSID(), ap.Channel(), ap.Encryption)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue