sqlmapproject/sqlmap · error · SqlmapConnectionException

%s ('%s')

Error message

%s ('%s')

What it means

Error "%s ('%s')" thrown in sqlmapproject/sqlmap.

Source

Thrown at lib/utils/api.py:480

        of StdDbOut's stderr branch for CLI --report-json runs)
        """
        logging.Handler.__init__(self)
        self.setLevel(logging.ERROR)
        self.collector = collector

    def emit(self, record):
        try:
            self.collector.execute("INSERT INTO errors VALUES(NULL, ?, ?)", (REPORT_TASKID, str(record.msg % record.args if record.args else record.msg)))
        except Exception:
            pass

def setRestAPILog():
    if conf.api:
        try:
            conf.databaseCursor = Database(conf.database)
            conf.databaseCursor.connect("client")
        except sqlite3.OperationalError as ex:
            raise SqlmapConnectionException("%s ('%s')" % (ex, conf.database))

        # Set a logging handler that writes log messages to a IPC database
        logger.removeHandler(LOGGER_HANDLER)
        LOGGER_RECORDER = LogRecorder()
        logger.addHandler(LOGGER_RECORDER)

# Generic functions
def is_admin(token):
    return safeCompareStrings(DataStore.admin_token, token)

def validate_task_options(taskid, options, caller):
    if not isinstance(options, dict):
        logger.warning("[%s] Invalid JSON options provided to %s()" % (taskid, caller))
        return "Invalid JSON options"

    for key in options:
        if key in RESTAPI_UNSUPPORTED_OPTIONS or key in RESTAPI_READONLY_OPTIONS:
            logger.warning("[%s] Unsupported option '%s' provided to %s()" % (taskid, key, caller))

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at lib/utils/api.py:480 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/f14bef9258addd86. Report an issue: GitHub.