more lint driven refactoring

This commit is contained in:
evilsocket 2018-04-24 18:26:16 +02:00
commit 0de6f3a76e
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
57 changed files with 168 additions and 241 deletions

View file

@ -16,7 +16,6 @@ var errNoRecon = errors.New("Module wifi.ap requires module wifi.recon to be act
func (w *WiFiModule) parseApConfig() (err error) {
var bssid string
if err, w.apConfig.SSID = w.StringParam("wifi.ap.ssid"); err != nil {
return
} else if err, bssid = w.StringParam("wifi.ap.bssid"); err != nil {
@ -28,13 +27,12 @@ func (w *WiFiModule) parseApConfig() (err error) {
} else if err, w.apConfig.Encryption = w.BoolParam("wifi.ap.encryption"); err != nil {
return
}
return
}
func (w *WiFiModule) startAp() error {
// we need channel hopping and packet injection for this
if w.Running() == false {
if w.Running() {
return errNoRecon
} else if w.apRunning {
return session.ErrAlreadyStarted
@ -47,7 +45,7 @@ func (w *WiFiModule) startAp() error {
}()
enc := core.Yellow("WPA2")
if w.apConfig.Encryption == false {
if !w.apConfig.Encryption {
enc = core.Green("Open")
}
log.Info("Sending beacons as SSID %s (%s) on channel %d (%s).",