mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
Adding support for 'empty' POST body (if forced by --method)
This commit is contained in:
@@ -92,8 +92,8 @@ def _setRequestParams():
|
|||||||
|
|
||||||
# Perform checks on POST parameters
|
# Perform checks on POST parameters
|
||||||
if conf.method == HTTPMETHOD.POST and conf.data is None:
|
if conf.method == HTTPMETHOD.POST and conf.data is None:
|
||||||
errMsg = "HTTP POST method depends on HTTP data value to be posted"
|
logger.warn("detected empty POST body")
|
||||||
raise SqlmapSyntaxException(errMsg)
|
conf.data = ""
|
||||||
|
|
||||||
if conf.data is not None:
|
if conf.data is not None:
|
||||||
conf.method = HTTPMETHOD.POST if not conf.method or conf.method == HTTPMETHOD.GET else conf.method
|
conf.method = HTTPMETHOD.POST if not conf.method or conf.method == HTTPMETHOD.GET else conf.method
|
||||||
|
|||||||
Reference in New Issue
Block a user