sqlmapproject/sqlmap · error · SqlmapFilePathException

the specified shared library file does not exist

Error message

the specified shared library file does not exist

What it means

Input validation in udfInjectCustom: the resolved local shared-library path (from --shared-lib or interactive prompt) does not exist on the filesystem, so there is nothing to upload. Checked with os.path.exists before any extension or format validation.

Solutions

  1. Correct the local path to the shared library file
  2. Compile the library first if it has not been built
  3. Verify read permissions on the file
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

Thrown at lib/takeover/udf.py:218

            warnMsg += "the current session user is not a database administrator"
            logger.warning(warnMsg)

        if not conf.shLib:
            msg = "what is the local path of the shared library? "

            while True:
                self.udfLocalFile = readInput(msg, default=None, checkBatch=False)

                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:]

View on GitHub (pinned to 0a35b20e39)