sqlmapproject/sqlmap · error · SqlmapSyntaxException
value for option '--dbms-cred' must be in format
Error message
value for option '--dbms-cred' must be in format <username>:<password> (e.g. "root:pass")
What it means
Startup value-validation guard in _basicOptionValidation: the credentials from --dbms-cred (conf.dbmsCred) must contain a ':' separating username and password; the error fires when the ':' is absent, so sqlmap cannot split the value into authentication parts for DBMS-level operations like --passwords cracking or OS shell authentication.
Solutions
- Supply credentials as username:password, e.g. --dbms-cred='root:pass'
- Quote the value in the shell if it contains special characters
- Remove --dbms-cred if authentication is not required
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/core/option.py:3098 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/cd372877a7b3a1fb.
Report an issue: GitHub.
Appendix: source
Thrown at lib/core/option.py:3098
if conf.timeSec < 1:
errMsg = "value for option '--time-sec' must be a positive integer"
raise SqlmapSyntaxException(errMsg)
if conf.hashFile and any((conf.direct, conf.url, conf.logFile, conf.bulkFile, conf.googleDork, conf.configFile, conf.requestFile, conf.updateAll, conf.smokeTest, conf.wizard, conf.dependencies, conf.purge, conf.listTampers)):
errMsg = "option '--crack' should be used as a standalone"
raise SqlmapSyntaxException(errMsg)
if isinstance(conf.uCols, six.string_types):
if not conf.uCols.isdigit() and ("-" not in conf.uCols or len(conf.uCols.split("-")) != 2):
errMsg = "value for option '--union-cols' must be a range with hyphon "
errMsg += "(e.g. 1-10) or integer value (e.g. 5)"
raise SqlmapSyntaxException(errMsg)
if conf.dbmsCred and ':' not in conf.dbmsCred:
errMsg = "value for option '--dbms-cred' must be in "
errMsg += "format <username>:<password> (e.g. \"root:pass\")"
raise SqlmapSyntaxException(errMsg)
if conf.encoding:
_ = checkCharEncoding(conf.encoding, False)
if _ is None:
errMsg = "unknown encoding '%s'. Please visit " % conf.encoding
errMsg += "'%s' to get the full list of " % CODECS_LIST_PAGE
errMsg += "supported encodings"
raise SqlmapSyntaxException(errMsg)
else:
conf.encoding = _
if conf.fileWrite and not os.path.isfile(conf.fileWrite):
errMsg = "file '%s' does not exist" % os.path.abspath(conf.fileWrite)
raise SqlmapFilePathException(errMsg)
if conf.loadCookies and not os.path.exists(conf.loadCookies):
errMsg = "cookies file '%s' does not exist" % os.path.abspath(conf.loadCookies)
raise SqlmapFilePathException(errMsg)View on GitHub (pinned to 0a35b20e39)