sqlmapproject/sqlmap · error · SqlmapMissingMandatoryOptionException

you provided a shared object as shared library, but the data

Error message

you provided a shared object as shared library, but the database underlying operating system is Windows

What it means

Error "you provided a shared object as shared library, but the database underlying operating system is Windows" thrown in sqlmapproject/sqlmap.

Source

Thrown at lib/takeover/udf.py:227

                if self.udfLocalFile:
                    break
                else:
                    logger.warning("you need to specify the local path of the shared library")
        else:
            self.udfLocalFile = conf.shLib

        if not os.path.exists(self.udfLocalFile):
            errMsg = "the specified shared library file does not exist"
            raise SqlmapFilePathException(errMsg)

        if not self.udfLocalFile.endswith(".dll") and not self.udfLocalFile.endswith(".so"):
            errMsg = "shared library file must end with '.dll' or '.so'"
            raise SqlmapMissingMandatoryOptionException(errMsg)

        elif self.udfLocalFile.endswith(".so") and Backend.isOs(OS.WINDOWS):
            errMsg = "you provided a shared object as shared library, but "
            errMsg += "the database underlying operating system is Windows"
            raise SqlmapMissingMandatoryOptionException(errMsg)

        elif self.udfLocalFile.endswith(".dll") and Backend.isOs(OS.LINUX):
            errMsg = "you provided a dynamic-link library as shared library, "
            errMsg += "but the database underlying operating system is Linux"
            raise SqlmapMissingMandatoryOptionException(errMsg)

        self.udfSharedLibName = os.path.splitext(os.path.basename(self.udfLocalFile))[0]
        self.udfSharedLibExt = os.path.splitext(self.udfLocalFile)[1][1:]

        msg = "how many user-defined functions do you want to create "
        msg += "from the shared library? "

        while True:
            udfCount = readInput(msg, default='1')

            if udfCount.isdigit():
                udfCount = int(udfCount)

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at lib/takeover/udf.py:227 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/bca703b9278b6945. Report an issue: GitHub.