mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -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
|
@ -1,7 +1,7 @@
|
|||
package http_proxy
|
||||
|
||||
import (
|
||||
"github.com/bettercap/bettercap/session"
|
||||
"github.com/bettercap/bettercap/v2/session"
|
||||
|
||||
"github.com/evilsocket/islazy/str"
|
||||
)
|
||||
|
@ -66,7 +66,7 @@ func NewHttpProxy(s *session.Session) *HttpProxy {
|
|||
return mod.Stop()
|
||||
}))
|
||||
|
||||
mod.InitState("stripper")
|
||||
mod.InitState("stripper")
|
||||
|
||||
return mod
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/bettercap/bettercap/firewall"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
btls "github.com/bettercap/bettercap/tls"
|
||||
"github.com/bettercap/bettercap/v2/firewall"
|
||||
"github.com/bettercap/bettercap/v2/session"
|
||||
btls "github.com/bettercap/bettercap/v2/tls"
|
||||
|
||||
"github.com/elazarl/goproxy"
|
||||
"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
|
||||
if stripSSL {
|
||||
for _, mname := range []string{"http.proxy", "https.proxy"}{
|
||||
for _, mname := range []string{"http.proxy", "https.proxy"} {
|
||||
err, m := p.Sess.Module(mname)
|
||||
if err == nil && m.Running() {
|
||||
var mextra interface{}
|
||||
|
|
|
@ -8,10 +8,10 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/bettercap/bettercap/log"
|
||||
"github.com/bettercap/bettercap/modules/dns_spoof"
|
||||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
"github.com/bettercap/bettercap/v2/log"
|
||||
"github.com/bettercap/bettercap/v2/modules/dns_spoof"
|
||||
"github.com/bettercap/bettercap/v2/network"
|
||||
"github.com/bettercap/bettercap/v2/session"
|
||||
|
||||
"github.com/elazarl/goproxy"
|
||||
"github.com/google/gopacket"
|
||||
|
@ -163,7 +163,7 @@ func (s *SSLStripper) fixCookiesInHeader(res *http.Response) {
|
|||
origHost := res.Request.URL.Hostname()
|
||||
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.
|
||||
// get domains from hostnames
|
||||
if origParts, strippedParts := strings.Split(origHost, "."), strings.Split(strippedHost.Hostname, "."); len(origParts) > 1 && len(strippedParts) > 1 {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/bettercap/bettercap/session"
|
||||
"github.com/bettercap/bettercap/v2/session"
|
||||
)
|
||||
|
||||
type JSRequest struct {
|
||||
|
|
|
@ -3,8 +3,8 @@ package http_proxy
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/bettercap/bettercap/log"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
"github.com/bettercap/bettercap/v2/log"
|
||||
"github.com/bettercap/bettercap/v2/session"
|
||||
|
||||
"github.com/robertkrimen/otto"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue