sqlmapproject/sqlmap · error · SqlmapSyntaxException
switch '--chunked' requires usage of (POST)…
Error message
switch '--chunked' requires usage of (POST) options/switches '--data', '-r', '--forms' or '--openapi'
What it means
Startup option-dependency guard in _basicOptionValidation: --chunked enables HTTP chunked transfer-encoding for the request body, which only makes sense when a body exists. The check fires because conf.chunked is set while none of the body sources (conf.data from --data, conf.requestFile from -r, conf.forms from --forms, conf.openApiFile from --openapi) is present.
Solutions
- Add a POST body via --data='param=value' alongside --chunked
- Provide an HTTP request file with -r, or use --forms / --openapi to generate a body
- Remove --chunked if the request is meant to be a plain GET without body
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/core/option.py:2867 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26).
Data as JSON: /api/errors/173027bb6bfc7b77.
Report an issue: GitHub.
Appendix: source
Thrown at lib/core/option.py:2867
raise SqlmapSyntaxException(errMsg)
if conf.alert and os.environ.get("SQLMAP_UNSAFE_ALERT") != '1':
errMsg = "for security reasons, to prevent execution of potentially malicious "
errMsg += "OS commands via configuration files or copy-paste attacks, "
errMsg += "the '--alert' option requires the environment variable "
errMsg += "'SQLMAP_UNSAFE_ALERT=1' to be explicitly set"
raise SqlmapSystemException(errMsg)
if conf.evalCode and os.environ.get("SQLMAP_UNSAFE_EVAL") != '1':
errMsg = "for security reasons, to prevent execution of potentially malicious "
errMsg += "Python code via configuration files or copy-paste attacks, "
errMsg += "the '--eval' option requires the environment variable "
errMsg += "'SQLMAP_UNSAFE_EVAL=1' to be explicitly set"
raise SqlmapSystemException(errMsg)
if conf.chunked and not any((conf.data, conf.requestFile, conf.forms, conf.openApiFile)):
errMsg = "switch '--chunked' requires usage of (POST) options/switches '--data', '-r', '--forms' or '--openapi'"
raise SqlmapSyntaxException(errMsg)
if conf.api and not conf.configFile:
errMsg = "switch '--api' requires usage of option '-c'"
raise SqlmapSyntaxException(errMsg)
if conf.data and conf.nullConnection:
errMsg = "option '--data' is incompatible with switch '--null-connection'"
raise SqlmapSyntaxException(errMsg)
if conf.string and conf.nullConnection:
errMsg = "option '--string' is incompatible with switch '--null-connection'"
raise SqlmapSyntaxException(errMsg)
if conf.notString and conf.nullConnection:
errMsg = "option '--not-string' is incompatible with switch '--null-connection'"
raise SqlmapSyntaxException(errMsg)
if conf.tor and conf.osPwn:View on GitHub (pinned to 0a35b20e39)