mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 03:23:48 +03:00
Adding support for 'empty' POST body (if forced by --method)
This commit is contained in:
parent
265a78b455
commit
401564898d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user