From d6606a8f3120315b70c06699e5de5ae6fa93ce92 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 31 Jan 2013 13:58:39 +0100 Subject: [PATCH] Patch to prevent problems like Issue #381 --- lib/core/option.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/core/option.py b/lib/core/option.py index 798b82cfe..afeb1b0ea 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -324,6 +324,10 @@ def _feedTargetsDict(reqFile, addedTargetUrls): scheme = "https" port = port or "443" + if not host: + errMsg = "invalid format of a request file" + raise SqlmapSyntaxException, errMsg + if not url.startswith("http"): url = "%s://%s:%s%s" % (scheme or "http", host, port or "80", url) scheme = None