From e1ef27f59224e00dcf03d859bebcd9db119ef70a Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Fri, 12 Nov 2010 12:25:02 +0000 Subject: [PATCH] work-around to be able to pass in the -r request file the Host header, the ending string ":443" and so sqlmap will go over https --- lib/core/option.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index bbf3aa2b3..28afa3d77 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -178,7 +178,14 @@ def __feedTargetsDict(reqFile, addedTargetUrls): if key.lower() == "cookie": cookie = value elif key.lower() == "host": - host = value + splitValue = value.split(":") + host = splitValue[0] + + if len(splitValue) > 1: + port = splitValue[1] + + if not scheme and port == "443": + scheme = "https" # Avoid to add a static content length header to # conf.httpHeaders and consider the following lines as