mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 04:52:10 -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,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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module github.com/bettercap/bettercap
|
module github.com/bettercap/bettercap/v2
|
||||||
|
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
8
main.go
8
main.go
|
@ -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"
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -3,14 +3,15 @@ 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)
|
||||||
|
|
||||||
type NodeCallback func(*Node)
|
type NodeCallback func(*Node)
|
||||||
type EdgeCallback func(*Node, []Edge, *Node)
|
type EdgeCallback func(*Node, []Edge, *Node)
|
||||||
|
|
|
@ -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{}
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package hid
|
package hid
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/bettercap/bettercap/network"
|
"github.com/bettercap/bettercap/v2/network"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package hid
|
package hid
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/bettercap/bettercap/network"
|
"github.com/bettercap/bettercap/v2/network"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
@ -66,7 +66,7 @@ func NewHttpProxy(s *session.Session) *HttpProxy {
|
||||||
return mod.Stop()
|
return mod.Stop()
|
||||||
}))
|
}))
|
||||||
|
|
||||||
mod.InitState("stripper")
|
mod.InitState("stripper")
|
||||||
|
|
||||||
return mod
|
return mod
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -175,7 +175,7 @@ func (p *HTTPProxy) Configure(address string, proxyPort int, httpPort int, doRed
|
||||||
|
|
||||||
// check if another http(s) proxy is using sslstrip and merge strippers
|
// check if another http(s) proxy is using sslstrip and merge strippers
|
||||||
if stripSSL {
|
if stripSSL {
|
||||||
for _, mname := range []string{"http.proxy", "https.proxy"}{
|
for _, mname := range []string{"http.proxy", "https.proxy"} {
|
||||||
err, m := p.Sess.Module(mname)
|
err, m := p.Sess.Module(mname)
|
||||||
if err == nil && m.Running() {
|
if err == nil && m.Running() {
|
||||||
var mextra interface{}
|
var mextra interface{}
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -163,7 +163,7 @@ func (s *SSLStripper) fixCookiesInHeader(res *http.Response) {
|
||||||
origHost := res.Request.URL.Hostname()
|
origHost := res.Request.URL.Hostname()
|
||||||
strippedHost := s.hosts.Strip(origHost /* unstripped */)
|
strippedHost := s.hosts.Strip(origHost /* unstripped */)
|
||||||
|
|
||||||
if strippedHost != nil && /*strippedHost.Hostname != origHost && */res.Header["Set-Cookie"] != nil {
|
if strippedHost != nil && /*strippedHost.Hostname != origHost && */ res.Header["Set-Cookie"] != nil {
|
||||||
// origHost is being tracked.
|
// origHost is being tracked.
|
||||||
// get domains from hostnames
|
// get domains from hostnames
|
||||||
if origParts, strippedParts := strings.Split(origHost, "."), strings.Split(strippedHost.Hostname, "."); len(origParts) > 1 && len(strippedParts) > 1 {
|
if origParts, strippedParts := strings.Split(origHost, "."), strings.Split(strippedHost.Hostname, "."); len(origParts) > 1 && len(strippedParts) > 1 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 (
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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{}
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
@ -168,10 +168,10 @@ func (mod *PacketProxy) Configure() (err error) {
|
||||||
mod.Warning("no plugin set")
|
mod.Warning("no plugin set")
|
||||||
}
|
}
|
||||||
|
|
||||||
config := nfqueue.Config {
|
config := nfqueue.Config{
|
||||||
NfQueue: uint16(mod.queueNum),
|
NfQueue: uint16(mod.queueNum),
|
||||||
Copymode: nfqueue.NfQnlCopyPacket,
|
Copymode: nfqueue.NfQnlCopyPacket,
|
||||||
AfFamily: syscall.AF_INET,
|
AfFamily: syscall.AF_INET,
|
||||||
MaxPacketLen: 0xFFFF,
|
MaxPacketLen: 0xFFFF,
|
||||||
MaxQueueLen: 0xFF,
|
MaxQueueLen: 0xFF,
|
||||||
WriteTimeout: 15 * time.Millisecond,
|
WriteTimeout: 15 * time.Millisecond,
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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(
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
@ -72,7 +72,7 @@ func (mod *Ticker) Configure() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type TickEvent struct {}
|
type TickEvent struct{}
|
||||||
|
|
||||||
func (mod *Ticker) Start() error {
|
func (mod *Ticker) Start() error {
|
||||||
if err := mod.Configure(); err != nil {
|
if err := mod.Configure(); err != nil {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue