mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
fix: using proper v2 package suffix (fixes #727)
This commit is contained in:
parent
76e136a18e
commit
2659a559c9
131 changed files with 318 additions and 297 deletions
|
@ -9,10 +9,10 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/bettercap/bettercap/modules/utils"
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/packets"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
"github.com/bettercap/bettercap/v2/modules/utils"
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
"github.com/bettercap/bettercap/v2/packets"
|
||||
"github.com/bettercap/bettercap/v2/session"
|
||||
|
||||
"github.com/google/gopacket"
|
||||
"github.com/google/gopacket/layers"
|
||||
|
@ -580,9 +580,9 @@ func (mod *WiFiModule) Configure() error {
|
|||
// second fatal error, just bail
|
||||
return fmt.Errorf("error while activating handle: %s", err)
|
||||
} else {
|
||||
// first fatal error, forcing monitor mode
|
||||
// first fatal error, forcing monitor mode
|
||||
// https://github.com/bettercap/bettercap/issues/819
|
||||
opts.Monitor = false;
|
||||
opts.Monitor = false
|
||||
if err := network.ForceMonitorMode(ifName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@ import (
|
|||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/packets"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
"github.com/bettercap/bettercap/v2/packets"
|
||||
"github.com/bettercap/bettercap/v2/session"
|
||||
|
||||
"github.com/evilsocket/islazy/tui"
|
||||
)
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"net"
|
||||
"sort"
|
||||
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/packets"
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
"github.com/bettercap/bettercap/v2/packets"
|
||||
)
|
||||
|
||||
func (mod *WiFiModule) sendAssocPacket(ap *network.AccessPoint) {
|
||||
|
|
|
@ -3,10 +3,11 @@ package wifi
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/packets"
|
||||
"github.com/google/gopacket/layers"
|
||||
"net"
|
||||
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
"github.com/bettercap/bettercap/v2/packets"
|
||||
"github.com/google/gopacket/layers"
|
||||
)
|
||||
|
||||
func (mod *WiFiModule) isCSASilent() bool {
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"net"
|
||||
"sort"
|
||||
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/packets"
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
"github.com/bettercap/bettercap/v2/packets"
|
||||
)
|
||||
|
||||
func (mod *WiFiModule) sendDeauthPacket(ap net.HardwareAddr, client net.HardwareAddr) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package wifi
|
||||
|
||||
import (
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
)
|
||||
|
||||
type ClientEvent struct {
|
||||
|
|
|
@ -3,11 +3,11 @@ package wifi
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/packets"
|
||||
"net"
|
||||
)
|
||||
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
"github.com/bettercap/bettercap/v2/packets"
|
||||
)
|
||||
|
||||
func (mod *WiFiModule) isFakeAuthSilent() bool {
|
||||
if err, is := mod.BoolParam("wifi.fake_auth.silent"); err != nil {
|
||||
|
@ -18,18 +18,18 @@ func (mod *WiFiModule) isFakeAuthSilent() bool {
|
|||
return mod.csaSilent
|
||||
}
|
||||
|
||||
func(mod *WiFiModule)sendFakeAuthPacket(bssid,client net.HardwareAddr){
|
||||
err,pkt:=packets.NewDot11Auth(client,bssid,0)
|
||||
if err!=nil{
|
||||
func (mod *WiFiModule) sendFakeAuthPacket(bssid, client net.HardwareAddr) {
|
||||
err, pkt := packets.NewDot11Auth(client, bssid, 0)
|
||||
if err != nil {
|
||||
mod.Error("could not create authentication packet: %s", err)
|
||||
return
|
||||
}
|
||||
for i:=0;i<32;i++{
|
||||
for i := 0; i < 32; i++ {
|
||||
mod.injectPacket(pkt)
|
||||
}
|
||||
}
|
||||
|
||||
func (mod *WiFiModule) startFakeAuth(bssid,client net.HardwareAddr) error {
|
||||
func (mod *WiFiModule) startFakeAuth(bssid, client net.HardwareAddr) error {
|
||||
// if not already running, temporarily enable the pcap handle
|
||||
// for packet injection
|
||||
if !mod.Running() {
|
||||
|
@ -63,9 +63,9 @@ func (mod *WiFiModule) startFakeAuth(bssid,client net.HardwareAddr) error {
|
|||
logger("fake authentication attack in AP: %s client: %s", ap.ESSID(), client.String())
|
||||
// send the beacon frame with channel switch announce element id
|
||||
mod.onChannel(ap.Channel, func() {
|
||||
mod.sendFakeAuthPacket(bssid,client)
|
||||
mod.sendFakeAuthPacket(bssid, client)
|
||||
})
|
||||
}
|
||||
}()
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
)
|
||||
|
||||
func (mod *WiFiModule) isInterfaceConnected() bool {
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/packets"
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
"github.com/bettercap/bettercap/v2/packets"
|
||||
|
||||
"github.com/google/gopacket"
|
||||
"github.com/google/gopacket/layers"
|
||||
|
|
|
@ -3,11 +3,12 @@ package wifi
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"net"
|
||||
"path"
|
||||
|
||||
"github.com/bettercap/bettercap/packets"
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
|
||||
"github.com/bettercap/bettercap/v2/packets"
|
||||
|
||||
"github.com/google/gopacket"
|
||||
"github.com/google/gopacket/layers"
|
||||
|
@ -135,8 +136,8 @@ func (mod *WiFiModule) discoverHandshakes(radiotap *layers.RadioTap, dot11 *laye
|
|||
|
||||
// quick and dirty heuristic, see thread here https://github.com/bettercap/bettercap/issues/810#issuecomment-805145392
|
||||
if isEAPOL || (dot11.Type.MainType() != layers.Dot11TypeData && dot11.Type.MainType() != layers.Dot11TypeCtrl) {
|
||||
target := (* network.Station)(nil)
|
||||
targetAP := (* network.AccessPoint)(nil)
|
||||
target := (*network.Station)(nil)
|
||||
targetAP := (*network.AccessPoint)(nil)
|
||||
|
||||
// collect target bssids
|
||||
bssids := make([]net.HardwareAddr, 0)
|
||||
|
|
|
@ -7,9 +7,9 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/bettercap/bettercap/modules/net_recon"
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
"github.com/bettercap/bettercap/v2/modules/net_recon"
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
"github.com/bettercap/bettercap/v2/session"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package wifi
|
||||
|
||||
import (
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
"github.com/bettercap/bettercap/v2/session"
|
||||
)
|
||||
|
||||
type ByRSSISorter []*network.Station
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue