sqlmapproject/sqlmap · error · SqlmapMissingMandatoryOptionException
shared library file must end with '.dll' or '.so'
Error message
shared library file must end with '.dll' or '.so'
What it means
Extension guard in udfInjectCustom: the supplied shared-library file has neither a .dll nor a .so suffix, so its platform cannot be determined. This is a user-input validation error that fires before the OS-compatibility cross-checks.
Solutions
- Rename or repackage the library with the correct extension
- Rebuild the artifact as a proper DLL or shared object
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/takeover/udf.py:222 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/9caea054e16aa4de.
Report an issue: GitHub.
Appendix: source
Thrown at lib/takeover/udf.py:222
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:]
msg = "how many user-defined functions do you want to create "
msg += "from the shared library? "
while True:View on GitHub (pinned to 0a35b20e39)