mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: fixed a bug in sslstripper (fixes #400)
This commit is contained in:
parent
740ac95428
commit
4ac66fd52a
1 changed files with 2 additions and 2 deletions
|
@ -300,11 +300,11 @@ func (s *SSLStripper) Process(res *http.Response, ctx *goproxy.ProxyCtx) {
|
|||
// are we getting redirected from http to https?
|
||||
if orig.Scheme == "http" && location.Scheme == "https" {
|
||||
|
||||
log.Info("[%s] Got redirection from HTTPS to HTTP: %s -> %s", tui.Green("sslstrip"), tui.Yellow("http://"+origHost), tui.Bold("https://"+newHost))
|
||||
log.Info("[%s] Got redirection from HTTP to HTTPS: %s -> %s", tui.Green("sslstrip"), tui.Yellow("http://"+origHost), tui.Bold("https://"+newHost))
|
||||
|
||||
// if we still did not reach max redirections, strip the URL down to
|
||||
// an alternative HTTP version
|
||||
if s.isMaxRedirs(origHost) {
|
||||
if !s.isMaxRedirs(origHost) {
|
||||
strippedURL := s.processURL(newURL)
|
||||
u, _ := url.Parse(strippedURL)
|
||||
hostStripped := u.Hostname()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue