From 401564898df95945eb1216cd92586a712e70c5fd Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 31 Aug 2015 14:43:41 +0200 Subject: [PATCH] Adding support for 'empty' POST body (if forced by --method) --- lib/core/target.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/target.py b/lib/core/target.py index 983d54541..cdfd538f0 100644 --- a/lib/core/target.py +++ b/lib/core/target.py @@ -92,8 +92,8 @@ def _setRequestParams(): # Perform checks on POST parameters if conf.method == HTTPMETHOD.POST and conf.data is None: - errMsg = "HTTP POST method depends on HTTP data value to be posted" - raise SqlmapSyntaxException(errMsg) + logger.warn("detected empty POST body") + conf.data = "" if conf.data is not None: conf.method = HTTPMETHOD.POST if not conf.method or conf.method == HTTPMETHOD.GET else conf.method