sqlmapproject/sqlmap · error · SqlmapSyntaxException
option '--cookie-del' should contain a single character…
Error message
option '--cookie-del' should contain a single character (e.g. ';')
What it means
Startup value-validation guard in _basicOptionValidation: the cookie delimiter from --cookie-del (conf.cookieDel) is checked with len(...) == 1; the error fires when the value has more than one character (or is empty), since sqlmap splits the Cookie header on a single separator.
Solutions
- Pass exactly one character, e.g. --cookie-del=';'
- Remove --cookie-del to use the default ',' separator
- If the delimiter appears escaped in your shell, quote the argument properly
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/core/option.py:2946 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/df0601ebab8e3340.
Report an issue: GitHub.
Appendix: source
Thrown at lib/core/option.py:2946
if conf.retryOn:
try:
re.compile(conf.retryOn)
except Exception as ex:
errMsg = "invalid regular expression '%s' ('%s')" % (conf.retryOn, getSafeExString(ex))
raise SqlmapSyntaxException(errMsg)
if conf.retries == defaults.retries:
conf.retries = 5 * conf.retries
warnMsg = "increasing default value for "
warnMsg += "option '--retries' to %d because " % conf.retries
warnMsg += "option '--retry-on' was provided"
logger.warning(warnMsg)
if conf.cookieDel and len(conf.cookieDel) != 1:
errMsg = "option '--cookie-del' should contain a single character (e.g. ';')"
raise SqlmapSyntaxException(errMsg)
if conf.crawlExclude:
try:
re.compile(conf.crawlExclude)
except Exception as ex:
errMsg = "invalid regular expression '%s' ('%s')" % (conf.crawlExclude, getSafeExString(ex))
raise SqlmapSyntaxException(errMsg)
if conf.scope:
try:
re.compile(conf.scope)
except Exception as ex:
errMsg = "invalid regular expression '%s' ('%s')" % (conf.scope, getSafeExString(ex))
raise SqlmapSyntaxException(errMsg)
if conf.dumpTable and conf.dumpAll:
errMsg = "switch '--dump' is incompatible with switch '--dump-all'"
raise SqlmapSyntaxException(errMsg)View on GitHub (pinned to 0a35b20e39)