From b8a107b2c66ca4ff0c2008a827542b2bbc8a1bad Mon Sep 17 00:00:00 2001 From: byt3bl33d3r Date: Sun, 15 Mar 2015 19:12:20 +0100 Subject: [PATCH] fixed redirection loop --- sslstrip/URLMonitor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sslstrip/URLMonitor.py b/sslstrip/URLMonitor.py index 863ecfc..e74f9cc 100644 --- a/sslstrip/URLMonitor.py +++ b/sslstrip/URLMonitor.py @@ -58,6 +58,11 @@ class URLMonitor: methodIndex = url.find("//") + 2 method = url[0:methodIndex] pathIndex = url.find("/", methodIndex) + + if pathIndex is -1: + pathIndex = len(url) + url += "/" + host = url[methodIndex:pathIndex].lower() path = url[pathIndex:]