fix: forcing https urls to http if sslstrip is enabled (ref #154)

This commit is contained in:
evilsocket 2018-03-09 12:36:01 +01:00
parent 2a601e1412
commit 26f3a000da
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -265,6 +265,11 @@ func (s *SSLStripper) Preprocess(req *http.Request, ctx *goproxy.ProxyCtx) (redi
// preprocess request headers
s.stripRequestHeaders(req)
// well ...
if req.URL.Scheme == "https" {
req.URL.Scheme = "http"
}
// handle stripped domains
original := s.hosts.Unstrip(req.Host)
if original != nil {