mirror of
https://github.com/bettercap/bettercap
synced 2025-07-10 23:33:28 -07:00
fix: fixing compilation on windows
This commit is contained in:
parent
4eb4417c06
commit
c50ebf9991
5 changed files with 63 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
// +build !windows
|
||||||
|
|
||||||
package modules
|
package modules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// +build !windows
|
||||||
|
|
||||||
package modules
|
package modules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
55
modules/ble_recon_windows.go
Normal file
55
modules/ble_recon_windows.go
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
package modules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/bettercap/bettercap/session"
|
||||||
|
)
|
||||||
|
|
||||||
|
type BLERecon struct {
|
||||||
|
session.SessionModule
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewBLERecon(s *session.Session) *BLERecon {
|
||||||
|
d := &BLERecon{
|
||||||
|
SessionModule: session.NewSessionModule("ble.recon", s),
|
||||||
|
}
|
||||||
|
|
||||||
|
d.AddHandler(session.NewModuleHandler("ble.recon on", "",
|
||||||
|
"Start Bluetooth Low Energy devices discovery.",
|
||||||
|
func(args []string) error {
|
||||||
|
return fmt.Errorf("ble.recon is not supported on Windows")
|
||||||
|
}))
|
||||||
|
|
||||||
|
d.AddHandler(session.NewModuleHandler("ble.recon off", "",
|
||||||
|
"Stop Bluetooth Low Energy devices discovery.",
|
||||||
|
func(args []string) error {
|
||||||
|
return fmt.Errorf("ble.recon is not supported on Windows")
|
||||||
|
}))
|
||||||
|
|
||||||
|
return d
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d BLERecon) Name() string {
|
||||||
|
return "ble.recon"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d BLERecon) Description() string {
|
||||||
|
return "Bluetooth Low Energy devices discovery."
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d BLERecon) Author() string {
|
||||||
|
return "Simone Margaritelli <evilsocket@protonmail.com>"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d *BLERecon) Configure() (err error) {
|
||||||
|
return fmt.Errorf("ble.recon is not supported on Windows")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d *BLERecon) Start() error {
|
||||||
|
return fmt.Errorf("ble.recon is not supported on Windows")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d *BLERecon) Stop() error {
|
||||||
|
return fmt.Errorf("ble.recon is not supported on Windows")
|
||||||
|
}
|
|
@ -1,3 +1,5 @@
|
||||||
|
// +build !windows
|
||||||
|
|
||||||
package network
|
package network
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// +build !windows
|
||||||
|
|
||||||
package network
|
package network
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue