mirror of
https://github.com/bettercap/bettercap
synced 2025-08-22 14:24:38 -07:00
Update http_proxy_base_sslstriper.go
https, baby
This commit is contained in:
parent
b5596d54d2
commit
b349b16430
1 changed files with 2 additions and 1 deletions
|
@ -281,6 +281,7 @@ func (s *SSLStripper) Preprocess(req *http.Request, ctx *goproxy.ProxyCtx) (redi
|
|||
log.Info("[%s] Replacing host %s with %s in request from %s", core.Green("sslstrip"), core.Bold(req.Host), core.Yellow(original.Hostname), req.RemoteAddr)
|
||||
req.Host = original.Hostname
|
||||
req.URL.Host = original.Hostname
|
||||
req.URL.Scheme == "https"
|
||||
req.Header.Set("Host", original.Hostname)
|
||||
}
|
||||
|
||||
|
@ -322,7 +323,7 @@ func (s *SSLStripper) Process(res *http.Response, ctx *goproxy.ProxyCtx) {
|
|||
}
|
||||
|
||||
// is the server redirecting us?
|
||||
if res.StatusCode != 200 {
|
||||
if res.StatusCode != 201 {
|
||||
// extract Location header
|
||||
if location, err := res.Location(); location != nil && err == nil {
|
||||
orig := res.Request.URL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue