fix: using proper v2 package suffix (fixes #727)

This commit is contained in:
Simone Margaritelli 2024-08-09 18:19:21 +02:00
parent 76e136a18e
commit 2659a559c9
131 changed files with 318 additions and 297 deletions

View file

@ -9,8 +9,8 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/bettercap/bettercap/core" "github.com/bettercap/bettercap/v2/core"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"
) )

View file

@ -6,8 +6,8 @@ import (
"os" "os"
"strings" "strings"
"github.com/bettercap/bettercap/core" "github.com/bettercap/bettercap/v2/core"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/evilsocket/islazy/fs" "github.com/evilsocket/islazy/fs"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"

View file

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/bettercap/bettercap/core" "github.com/bettercap/bettercap/v2/core"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
) )
type WindowsFirewall struct { type WindowsFirewall struct {

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/bettercap/bettercap module github.com/bettercap/bettercap/v2
go 1.16 go 1.16

View file

@ -3,7 +3,8 @@ package js
import ( import (
"math/rand" "math/rand"
"net" "net"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/v2/network"
) )
type randomPackage struct { type randomPackage struct {

View file

@ -1,7 +1,7 @@
package log package log
import ( import (
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
ll "github.com/evilsocket/islazy/log" ll "github.com/evilsocket/islazy/log"
) )

View file

@ -8,10 +8,10 @@ import (
"runtime" "runtime"
"github.com/bettercap/bettercap/core" "github.com/bettercap/bettercap/v2/core"
"github.com/bettercap/bettercap/log" "github.com/bettercap/bettercap/v2/log"
"github.com/bettercap/bettercap/modules" "github.com/bettercap/bettercap/v2/modules"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"

View file

@ -2,11 +2,12 @@ package any_proxy
import ( import (
"fmt" "fmt"
"github.com/bettercap/bettercap/firewall"
"github.com/bettercap/bettercap/session"
"github.com/evilsocket/islazy/str"
"strconv" "strconv"
"strings" "strings"
"github.com/bettercap/bettercap/v2/firewall"
"github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/str"
) )
type AnyProxy struct { type AnyProxy struct {

View file

@ -7,8 +7,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/bettercap/bettercap/tls" "github.com/bettercap/bettercap/v2/tls"
"github.com/bettercap/recording" "github.com/bettercap/recording"

View file

@ -11,7 +11,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/gorilla/mux" "github.com/gorilla/mux"
) )

View file

@ -6,7 +6,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
) )

View file

@ -7,9 +7,9 @@ import (
"sync" "sync"
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/malfunkt/iprange" "github.com/malfunkt/iprange"
) )

View file

@ -9,9 +9,9 @@ import (
golog "log" golog "log"
"time" "time"
"github.com/bettercap/bettercap/modules/utils" "github.com/bettercap/bettercap/v2/modules/utils"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/bettercap/gatt" "github.com/bettercap/gatt"

View file

@ -1,3 +1,4 @@
//go:build !windows
// +build !windows // +build !windows
package ble package ble
@ -6,7 +7,7 @@ import (
"sort" "sort"
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/evilsocket/islazy/ops" "github.com/evilsocket/islazy/ops"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"

View file

@ -1,3 +1,4 @@
//go:build !windows
// +build !windows // +build !windows
package ble package ble
@ -8,7 +9,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/gatt" "github.com/bettercap/gatt"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"

View file

@ -1,9 +1,10 @@
//go:build !windows
// +build !windows // +build !windows
package ble package ble
import ( import (
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
) )
type ByBLERSSISorter []*network.BLEDevice type ByBLERSSISorter []*network.BLEDevice

View file

@ -1,9 +1,10 @@
//go:build windows
// +build windows // +build windows
package ble package ble
import ( import (
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
) )
type BLERecon struct { type BLERecon struct {

View file

@ -4,14 +4,15 @@ import (
"bytes" "bytes"
"crypto/tls" "crypto/tls"
"fmt" "fmt"
"strings"
"text/template"
"github.com/acarl005/stripansi" "github.com/acarl005/stripansi"
"github.com/bettercap/bettercap/modules/events_stream" "github.com/bettercap/bettercap/v2/modules/events_stream"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/log" "github.com/evilsocket/islazy/log"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"
irc "github.com/thoj/go-ircevent" irc "github.com/thoj/go-ircevent"
"strings"
"text/template"
) )
type settings struct { type settings struct {

View file

@ -4,7 +4,7 @@ import (
"errors" "errors"
"net" "net"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"go.einride.tech/can/pkg/descriptor" "go.einride.tech/can/pkg/descriptor"
"go.einride.tech/can/pkg/socketcan" "go.einride.tech/can/pkg/socketcan"
) )

View file

@ -6,8 +6,8 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"
"go.einride.tech/can" "go.einride.tech/can"
"go.einride.tech/can/pkg/socketcan" "go.einride.tech/can/pkg/socketcan"

View file

@ -3,7 +3,7 @@ package can
import ( import (
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/dustin/go-humanize" "github.com/dustin/go-humanize"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -6,8 +6,8 @@ import (
"net/http" "net/http"
"os" "os"
"github.com/bettercap/bettercap/caplets" "github.com/bettercap/bettercap/v2/caplets"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/dustin/go-humanize" "github.com/dustin/go-humanize"

View file

@ -9,9 +9,9 @@ import (
"sync" "sync"
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"

View file

@ -7,10 +7,10 @@ import (
"strconv" "strconv"
"sync" "sync"
"github.com/bettercap/bettercap/log" "github.com/bettercap/bettercap/v2/log"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"

View file

@ -8,7 +8,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/fs" "github.com/evilsocket/islazy/fs"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"

View file

@ -1,7 +1,7 @@
package events_stream package events_stream
import ( import (
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -6,11 +6,11 @@ import (
"os" "os"
"strings" "strings"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/bettercap/bettercap/modules/net_sniff" "github.com/bettercap/bettercap/v2/modules/net_sniff"
"github.com/bettercap/bettercap/modules/syn_scan" "github.com/bettercap/bettercap/v2/modules/syn_scan"
"github.com/google/go-github/github" "github.com/google/go-github/github"

View file

@ -1,3 +1,4 @@
//go:build !windows
// +build !windows // +build !windows
package events_stream package events_stream
@ -6,8 +7,8 @@ import (
"fmt" "fmt"
"io" "io"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -1,10 +1,12 @@
//go:build windows
// +build windows // +build windows
package events_stream package events_stream
import ( import (
"io" "io"
"github.com/bettercap/bettercap/session"
"github.com/bettercap/bettercap/v2/session"
) )
func (mod *EventsStream) viewBLEEvent(output io.Writer, e session.Event) { func (mod *EventsStream) viewBLEEvent(output io.Writer, e session.Event) {

View file

@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"io" "io"
"github.com/bettercap/bettercap/modules/can" "github.com/bettercap/bettercap/v2/modules/can"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/dustin/go-humanize" "github.com/dustin/go-humanize"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"io" "io"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"io" "io"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"io" "io"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -11,8 +11,8 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/bettercap/bettercap/modules/net_sniff" "github.com/bettercap/bettercap/v2/modules/net_sniff"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -2,12 +2,13 @@ package events_stream
import ( import (
"fmt" "fmt"
"github.com/bettercap/bettercap/modules/wifi"
"io" "io"
"strings" "strings"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/modules/wifi"
"github.com/bettercap/bettercap/session"
"github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -7,7 +7,7 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/antchfx/jsonquery" "github.com/antchfx/jsonquery"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"

View file

@ -5,7 +5,7 @@ import (
"io" "io"
"time" "time"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/adrianmo/go-nmea" "github.com/adrianmo/go-nmea"
"github.com/stratoberry/go-gpsd" "github.com/stratoberry/go-gpsd"

View file

@ -2,7 +2,8 @@ package graph
import ( import (
"fmt" "fmt"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/v2/network"
) )
func (mod *Module) createIPGraph(endpoint *network.Endpoint) (*Node, bool, error) { func (mod *Module) createIPGraph(endpoint *network.Endpoint) (*Node, bool, error) {

View file

@ -2,8 +2,9 @@ package graph
import ( import (
"fmt" "fmt"
"github.com/bettercap/bettercap/session"
"time" "time"
"github.com/bettercap/bettercap/v2/session"
) )
type EdgeType string type EdgeType string

View file

@ -3,11 +3,12 @@ package graph
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/bettercap/bettercap/session"
"github.com/evilsocket/islazy/fs"
"path" "path"
"sync" "sync"
"time" "time"
"github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/fs"
) )
var Loaded = (*Graph)(nil) var Loaded = (*Graph)(nil)

View file

@ -1,7 +1,7 @@
package graph package graph
import ( import (
"github.com/bettercap/bettercap/log" "github.com/bettercap/bettercap/v2/log"
) )
type graphPackage struct{} type graphPackage struct{}

View file

@ -7,10 +7,10 @@ import (
"sync" "sync"
"time" "time"
"github.com/bettercap/bettercap/caplets" "github.com/bettercap/bettercap/v2/caplets"
"github.com/bettercap/bettercap/modules/wifi" "github.com/bettercap/bettercap/v2/modules/wifi"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/fs" "github.com/evilsocket/islazy/fs"
"github.com/evilsocket/islazy/plugin" "github.com/evilsocket/islazy/plugin"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"

View file

@ -1,7 +1,7 @@
package hid package hid
import ( import (
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
) )
const ( const (

View file

@ -1,7 +1,7 @@
package hid package hid
import ( import (
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
) )
const ( const (

View file

@ -3,7 +3,7 @@ package hid
import ( import (
"fmt" "fmt"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
) )
type MicrosoftBuilder struct { type MicrosoftBuilder struct {

View file

@ -1,7 +1,7 @@
package hid package hid
import ( import (
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
) )
type FrameBuilder interface { type FrameBuilder interface {

View file

@ -6,8 +6,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/bettercap/bettercap/modules/utils" "github.com/bettercap/bettercap/v2/modules/utils"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/bettercap/nrf24" "github.com/bettercap/nrf24"
) )

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"

View file

@ -4,7 +4,7 @@ import (
"sort" "sort"
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/dustin/go-humanize" "github.com/dustin/go-humanize"

View file

@ -1,7 +1,7 @@
package hid package hid
import ( import (
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
) )
type ByHIDMacSorter []*network.HIDDevice type ByHIDMacSorter []*network.HIDDevice

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/nrf24" "github.com/bettercap/nrf24"

View file

@ -1,7 +1,7 @@
package http_proxy package http_proxy
import ( import (
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"
) )

View file

@ -16,9 +16,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/bettercap/bettercap/firewall" "github.com/bettercap/bettercap/v2/firewall"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
btls "github.com/bettercap/bettercap/tls" btls "github.com/bettercap/bettercap/v2/tls"
"github.com/elazarl/goproxy" "github.com/elazarl/goproxy"
"github.com/inconshreveable/go-vhost" "github.com/inconshreveable/go-vhost"

View file

@ -8,10 +8,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/bettercap/bettercap/log" "github.com/bettercap/bettercap/v2/log"
"github.com/bettercap/bettercap/modules/dns_spoof" "github.com/bettercap/bettercap/v2/modules/dns_spoof"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/elazarl/goproxy" "github.com/elazarl/goproxy"
"github.com/google/gopacket" "github.com/google/gopacket"

View file

@ -9,7 +9,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
) )
type JSRequest struct { type JSRequest struct {

View file

@ -3,8 +3,8 @@ package http_proxy
import ( import (
"net/http" "net/http"
"github.com/bettercap/bettercap/log" "github.com/bettercap/bettercap/v2/log"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/robertkrimen/otto" "github.com/robertkrimen/otto"

View file

@ -7,7 +7,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -1,9 +1,9 @@
package https_proxy package https_proxy
import ( import (
"github.com/bettercap/bettercap/modules/http_proxy" "github.com/bettercap/bettercap/v2/modules/http_proxy"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/bettercap/bettercap/tls" "github.com/bettercap/bettercap/v2/tls"
"github.com/evilsocket/islazy/fs" "github.com/evilsocket/islazy/fs"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"

View file

@ -7,8 +7,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/bettercap/bettercap/tls" "github.com/bettercap/bettercap/v2/tls"
"github.com/evilsocket/islazy/fs" "github.com/evilsocket/islazy/fs"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"

View file

@ -6,9 +6,9 @@ import (
"runtime" "runtime"
"strings" "strings"
"github.com/bettercap/bettercap/core" "github.com/bettercap/bettercap/v2/core"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -7,7 +7,7 @@ import (
"net" "net"
"os" "os"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"

View file

@ -1,40 +1,40 @@
package modules package modules
import ( import (
"github.com/bettercap/bettercap/modules/any_proxy" "github.com/bettercap/bettercap/v2/modules/any_proxy"
"github.com/bettercap/bettercap/modules/api_rest" "github.com/bettercap/bettercap/v2/modules/api_rest"
"github.com/bettercap/bettercap/modules/arp_spoof" "github.com/bettercap/bettercap/v2/modules/arp_spoof"
"github.com/bettercap/bettercap/modules/ble" "github.com/bettercap/bettercap/v2/modules/ble"
"github.com/bettercap/bettercap/modules/c2" "github.com/bettercap/bettercap/v2/modules/c2"
"github.com/bettercap/bettercap/modules/can" "github.com/bettercap/bettercap/v2/modules/can"
"github.com/bettercap/bettercap/modules/caplets" "github.com/bettercap/bettercap/v2/modules/caplets"
"github.com/bettercap/bettercap/modules/dhcp6_spoof" "github.com/bettercap/bettercap/v2/modules/dhcp6_spoof"
"github.com/bettercap/bettercap/modules/dns_spoof" "github.com/bettercap/bettercap/v2/modules/dns_spoof"
"github.com/bettercap/bettercap/modules/events_stream" "github.com/bettercap/bettercap/v2/modules/events_stream"
"github.com/bettercap/bettercap/modules/gps" "github.com/bettercap/bettercap/v2/modules/gps"
"github.com/bettercap/bettercap/modules/graph" "github.com/bettercap/bettercap/v2/modules/graph"
"github.com/bettercap/bettercap/modules/hid" "github.com/bettercap/bettercap/v2/modules/hid"
"github.com/bettercap/bettercap/modules/http_proxy" "github.com/bettercap/bettercap/v2/modules/http_proxy"
"github.com/bettercap/bettercap/modules/http_server" "github.com/bettercap/bettercap/v2/modules/http_server"
"github.com/bettercap/bettercap/modules/https_proxy" "github.com/bettercap/bettercap/v2/modules/https_proxy"
"github.com/bettercap/bettercap/modules/https_server" "github.com/bettercap/bettercap/v2/modules/https_server"
"github.com/bettercap/bettercap/modules/mac_changer" "github.com/bettercap/bettercap/v2/modules/mac_changer"
"github.com/bettercap/bettercap/modules/mdns_server" "github.com/bettercap/bettercap/v2/modules/mdns_server"
"github.com/bettercap/bettercap/modules/mysql_server" "github.com/bettercap/bettercap/v2/modules/mysql_server"
"github.com/bettercap/bettercap/modules/ndp_spoof" "github.com/bettercap/bettercap/v2/modules/ndp_spoof"
"github.com/bettercap/bettercap/modules/net_probe" "github.com/bettercap/bettercap/v2/modules/net_probe"
"github.com/bettercap/bettercap/modules/net_recon" "github.com/bettercap/bettercap/v2/modules/net_recon"
"github.com/bettercap/bettercap/modules/net_sniff" "github.com/bettercap/bettercap/v2/modules/net_sniff"
"github.com/bettercap/bettercap/modules/packet_proxy" "github.com/bettercap/bettercap/v2/modules/packet_proxy"
"github.com/bettercap/bettercap/modules/syn_scan" "github.com/bettercap/bettercap/v2/modules/syn_scan"
"github.com/bettercap/bettercap/modules/tcp_proxy" "github.com/bettercap/bettercap/v2/modules/tcp_proxy"
"github.com/bettercap/bettercap/modules/ticker" "github.com/bettercap/bettercap/v2/modules/ticker"
"github.com/bettercap/bettercap/modules/ui" "github.com/bettercap/bettercap/v2/modules/ui"
"github.com/bettercap/bettercap/modules/update" "github.com/bettercap/bettercap/v2/modules/update"
"github.com/bettercap/bettercap/modules/wifi" "github.com/bettercap/bettercap/v2/modules/wifi"
"github.com/bettercap/bettercap/modules/wol" "github.com/bettercap/bettercap/v2/modules/wol"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
) )
func LoadModules(sess *session.Session) { func LoadModules(sess *session.Session) {

View file

@ -8,8 +8,8 @@ import (
"net" "net"
"strings" "strings"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -2,13 +2,14 @@ package ndp_spoof
import ( import (
"fmt" "fmt"
"github.com/bettercap/bettercap/packets"
"github.com/evilsocket/islazy/str"
"net" "net"
"sync" "sync"
"time" "time"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/packets"
"github.com/evilsocket/islazy/str"
"github.com/bettercap/bettercap/v2/session"
) )
type NDPSpoofer struct { type NDPSpoofer struct {

View file

@ -4,8 +4,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/malfunkt/iprange" "github.com/malfunkt/iprange"
) )

View file

@ -6,7 +6,7 @@ import (
"log" "log"
"net" "net"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/hashicorp/mdns" "github.com/hashicorp/mdns"
) )

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"net" "net"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
) )
func (mod *Prober) sendProbeNBNS(from net.IP, from_hw net.HardwareAddr, ip net.IP) { func (mod *Prober) sendProbeNBNS(from net.IP, from_hw net.HardwareAddr, ip net.IP) {

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"net" "net"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
) )
func (mod *Prober) sendProbeUPNP(from net.IP, from_hw net.HardwareAddr) { func (mod *Prober) sendProbeUPNP(from net.IP, from_hw net.HardwareAddr) {

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"net" "net"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
) )
func (mod *Prober) sendProbeWSD(from net.IP, from_hw net.HardwareAddr) { func (mod *Prober) sendProbeWSD(from net.IP, from_hw net.HardwareAddr) {

View file

@ -1,11 +1,12 @@
package net_recon package net_recon
import ( import (
"github.com/bettercap/bettercap/modules/utils"
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/modules/utils"
"github.com/bettercap/bettercap/session"
"github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/v2/session"
) )
type Discovery struct { type Discovery struct {

View file

@ -2,18 +2,19 @@ package net_recon
import ( import (
"fmt" "fmt"
"github.com/bettercap/bettercap/modules/syn_scan"
"sort" "sort"
"strings" "strings"
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/modules/syn_scan"
"github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/v2/packets"
"github.com/dustin/go-humanize" "github.com/dustin/go-humanize"
"github.com/evilsocket/islazy/tui"
"github.com/evilsocket/islazy/str" "github.com/evilsocket/islazy/str"
"github.com/evilsocket/islazy/tui"
) )
const ( const (

View file

@ -1,9 +1,9 @@
package net_recon package net_recon
import ( import (
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
) )
type ByAddressSorter []*network.Endpoint type ByAddressSorter []*network.Endpoint

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"

View file

@ -5,9 +5,9 @@ import (
"regexp" "regexp"
"time" "time"
"github.com/bettercap/bettercap/log" "github.com/bettercap/bettercap/v2/log"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/google/gopacket/pcap" "github.com/google/gopacket/pcap"
"github.com/google/gopacket/pcapgo" "github.com/google/gopacket/pcapgo"

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
) )
type SniffData map[string]interface{} type SniffData map[string]interface{}

View file

@ -4,7 +4,7 @@ import (
"encoding/asn1" "encoding/asn1"
"net" "net"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"

View file

@ -4,8 +4,8 @@ import (
"net" "net"
"strings" "strings"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"

View file

@ -5,7 +5,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"

View file

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"net" "net"
"github.com/bettercap/bettercap/log" "github.com/bettercap/bettercap/v2/log"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"

View file

@ -1,8 +1,9 @@
package net_sniff package net_sniff
import ( import (
"github.com/bettercap/bettercap/log"
"time" "time"
"github.com/bettercap/bettercap/v2/log"
) )
type SnifferStats struct { type SnifferStats struct {

View file

@ -1,9 +1,10 @@
package net_sniff package net_sniff
import ( import (
"github.com/bettercap/bettercap/packets"
"net" "net"
"github.com/bettercap/bettercap/v2/packets"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"net" "net"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"net" "net"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"

View file

@ -1,7 +1,7 @@
package packet_proxy package packet_proxy
import ( import (
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
) )
type PacketProxy struct { type PacketProxy struct {

View file

@ -1,7 +1,7 @@
package packet_proxy package packet_proxy
import ( import (
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
) )
type PacketProxy struct { type PacketProxy struct {

View file

@ -1,15 +1,15 @@
package packet_proxy package packet_proxy
import ( import (
"context"
"fmt" "fmt"
"plugin" "plugin"
"context"
"strings" "strings"
"syscall" "syscall"
"time" "time"
"github.com/bettercap/bettercap/core" "github.com/bettercap/bettercap/v2/core"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
nfqueue "github.com/florianl/go-nfqueue/v2" nfqueue "github.com/florianl/go-nfqueue/v2"

View file

@ -1,7 +1,7 @@
package packet_proxy package packet_proxy
import ( import (
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
) )
type PacketProxy struct { type PacketProxy struct {

View file

@ -7,9 +7,9 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/async" "github.com/evilsocket/islazy/async"

View file

@ -1,8 +1,8 @@
package syn_scan package syn_scan
import ( import (
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
) )
type SynScanEvent struct { type SynScanEvent struct {

View file

@ -3,7 +3,7 @@ package syn_scan
import ( import (
"sync/atomic" "sync/atomic"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"
@ -28,8 +28,6 @@ func (mod *SynScanner) onPacket(pkt gopacket.Packet) {
var ip6 layers.IPv6 var ip6 layers.IPv6
var tcp layers.TCP var tcp layers.TCP
isIPv6 := false isIPv6 := false
foundLayerTypes := []gopacket.LayerType{} foundLayerTypes := []gopacket.LayerType{}
parser := gopacket.NewDecodingLayerParser( parser := gopacket.NewDecodingLayerParser(

View file

@ -6,8 +6,8 @@ import (
"net" "net"
"sync" "sync"
"github.com/bettercap/bettercap/firewall" "github.com/bettercap/bettercap/v2/firewall"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/robertkrimen/otto" "github.com/robertkrimen/otto"
) )

View file

@ -4,8 +4,8 @@ import (
"net" "net"
"strings" "strings"
"github.com/bettercap/bettercap/log" "github.com/bettercap/bettercap/v2/log"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/plugin" "github.com/evilsocket/islazy/plugin"

View file

@ -3,7 +3,7 @@ package ticker
import ( import (
"time" "time"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
) )
type Ticker struct { type Ticker struct {

View file

@ -11,7 +11,7 @@ import (
"regexp" "regexp"
"runtime" "runtime"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/google/go-github/github" "github.com/google/go-github/github"

View file

@ -6,8 +6,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/bettercap/bettercap/core" "github.com/bettercap/bettercap/v2/core"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/google/go-github/github" "github.com/google/go-github/github"

View file

@ -6,7 +6,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -9,10 +9,10 @@ import (
"sync" "sync"
"time" "time"
"github.com/bettercap/bettercap/modules/utils" "github.com/bettercap/bettercap/v2/modules/utils"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"
@ -582,7 +582,7 @@ func (mod *WiFiModule) Configure() error {
} else { } else {
// first fatal error, forcing monitor mode // first fatal error, forcing monitor mode
// https://github.com/bettercap/bettercap/issues/819 // https://github.com/bettercap/bettercap/issues/819
opts.Monitor = false; opts.Monitor = false
if err := network.ForceMonitorMode(ifName); err != nil { if err := network.ForceMonitorMode(ifName); err != nil {
return err return err
} }

View file

@ -5,9 +5,9 @@ import (
"net" "net"
"time" "time"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
"github.com/bettercap/bettercap/session" "github.com/bettercap/bettercap/v2/session"
"github.com/evilsocket/islazy/tui" "github.com/evilsocket/islazy/tui"
) )

View file

@ -6,8 +6,8 @@ import (
"net" "net"
"sort" "sort"
"github.com/bettercap/bettercap/network" "github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/packets" "github.com/bettercap/bettercap/v2/packets"
) )
func (mod *WiFiModule) sendAssocPacket(ap *network.AccessPoint) { func (mod *WiFiModule) sendAssocPacket(ap *network.AccessPoint) {

View file

@ -3,10 +3,11 @@ package wifi
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/packets"
"github.com/google/gopacket/layers"
"net" "net"
"github.com/bettercap/bettercap/v2/network"
"github.com/bettercap/bettercap/v2/packets"
"github.com/google/gopacket/layers"
) )
func (mod *WiFiModule) isCSASilent() bool { func (mod *WiFiModule) isCSASilent() bool {

Some files were not shown because too many files have changed in this diff Show more