mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
started structuring project for testing + lint driven various refactoring
This commit is contained in:
parent
64099bc1fb
commit
bc3be7dd2b
5 changed files with 17 additions and 18 deletions
|
@ -241,8 +241,11 @@ func (d *BLERecon) onPeriphDisconnected(p gatt.Peripheral, err error) {
|
|||
}
|
||||
|
||||
func (d *BLERecon) onPeriphConnected(p gatt.Peripheral, err error) {
|
||||
// timed out
|
||||
if d.currDevice == nil {
|
||||
if err != nil {
|
||||
log.Warning("Connected to %s but with error: %s", p.ID(), err)
|
||||
return
|
||||
} else if d.currDevice == nil {
|
||||
// timed out
|
||||
log.Warning("Connected to %s but after the timeout :(", p.ID())
|
||||
return
|
||||
}
|
||||
|
|
|
@ -162,7 +162,6 @@ func (s *EventsStream) Start() error {
|
|||
} else {
|
||||
log.Debug("Skipping ignored event %v", e)
|
||||
}
|
||||
break
|
||||
|
||||
case <-s.quit:
|
||||
return
|
||||
|
|
|
@ -81,9 +81,9 @@ func (mc *MacChanger) Configure() (err error) {
|
|||
}
|
||||
|
||||
func (mc *MacChanger) setMac(mac net.HardwareAddr) error {
|
||||
os := runtime.GOOS
|
||||
args := []string{}
|
||||
var args []string
|
||||
|
||||
os := runtime.GOOS
|
||||
if strings.Contains(os, "bsd") || os == "darwin" {
|
||||
args = []string{mc.iface, "ether", mac.String()}
|
||||
} else if os == "linux" || os == "android" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue