mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
fix: forcing https urls to http if sslstrip is enabled (ref #154)
This commit is contained in:
parent
2a601e1412
commit
26f3a000da
1 changed files with 5 additions and 0 deletions
|
@ -265,6 +265,11 @@ func (s *SSLStripper) Preprocess(req *http.Request, ctx *goproxy.ProxyCtx) (redi
|
||||||
// preprocess request headers
|
// preprocess request headers
|
||||||
s.stripRequestHeaders(req)
|
s.stripRequestHeaders(req)
|
||||||
|
|
||||||
|
// well ...
|
||||||
|
if req.URL.Scheme == "https" {
|
||||||
|
req.URL.Scheme = "http"
|
||||||
|
}
|
||||||
|
|
||||||
// handle stripped domains
|
// handle stripped domains
|
||||||
original := s.hosts.Unstrip(req.Host)
|
original := s.hosts.Unstrip(req.Host)
|
||||||
if original != nil {
|
if original != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue