From 3434a2287204bfccba6e5bb3b44a9697cbdc5fe4 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 12 Jan 2010 14:07:58 +0000 Subject: [PATCH] HTTP header HOST is now mandatory in a HTTP request file --- lib/core/option.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index 03f154b0e..096e90986 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -365,21 +365,9 @@ def __setRequestFromFile(): if host: conf.url = "%s%s" % (host, page) - elif conf.url: #insert page into here - index = conf.url.find("://") - if index != -1: - index += len("://") - else: - index = 0 - - index = conf.url.find("/", index) - if index != -1: - conf.url = "%s%s" % (conf.url[:conf.url.find("/", index)], page) - else: - conf.url = "%s%s" % (conf.url, page) - pass #mirek else: - errMsg = "target url is not known" + errMsg = "mandatory HTTP header HOST is missing in " + errMsg += "the HTTP request file" raise sqlmapFilePathException, errMsg def __setMetasploit():