sqlmapproject/sqlmap · error · SqlmapSyntaxException

switch/option ' ' is obsolete

Error message

switch/option '%s' is obsolete

What it means

Lookup guard in checkOldOptions(): each command-line argument (split at '=') is matched against OBSOLETE_OPTIONS, and any hit raises SqlmapSyntaxException with the obsolete switch name plus its replacement hint.

Solutions

  1. Replace the obsolete switch with its hinted modern equivalent from the error message
  2. Check the current wiki (usage) for the up-to-date option list
  3. Remove the obsolete switch entirely if the functionality was dropped
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/core/common.py:5094 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/e8a2bd1185f7cf6b. Report an issue: GitHub.

Appendix: source

Thrown at lib/core/common.py:5094

            retVal = retVal[:retVal.rfind(':')]

    if retVal and retVal.count(':') > 1 and not any(_ in retVal for _ in ('[', ']')):
        retVal = "[%s]" % retVal

    return retVal

def checkOldOptions(args):
    """
    Checks for obsolete/deprecated options
    """

    for _ in args:
        _ = _.split('=')[0].strip()
        if _ in OBSOLETE_OPTIONS:
            errMsg = "switch/option '%s' is obsolete" % _
            if OBSOLETE_OPTIONS[_]:
                errMsg += " (hint: %s)" % OBSOLETE_OPTIONS[_]
            raise SqlmapSyntaxException(errMsg)
        elif _ in DEPRECATED_OPTIONS:
            warnMsg = "switch/option '%s' is deprecated" % _
            if DEPRECATED_OPTIONS[_]:
                warnMsg += " (hint: %s)" % DEPRECATED_OPTIONS[_]
            logger.warning(warnMsg)

def checkSystemEncoding():
    """
    Checks for problematic encodings
    """

    if sys.getdefaultencoding() == "cp720":
        try:
            codecs.lookup("cp720")
        except LookupError:
            errMsg = "there is a known Python issue (#1616979) related "
            errMsg += "to support for charset 'cp720'. Please visit "
            errMsg += "'http://blog.oneortheother.info/tip/python-fix-cp720-encoding/index.html' "

View on GitHub (pinned to 0a35b20e39)