sqlmapproject/sqlmap · error · SqlmapFilePathException

postprocess script ' ' does not exist

Error message

postprocess script '%s' does not exist

What it means

_setPostprocessFunctions iterates over the comma-split values of --postprocess and, per script, first checks os.path.exists. This is an existence guard: when the path given on the command line does not exist on disk (typo, wrong relative path, deleted file), a SqlmapFilePathException is raised with the raw script value embedded in the message.

Solutions

  1. Check the path passed to --postprocess for typos; use an absolute path if unsure.
  2. Verify the script file actually exists at that location (`ls <path>`).
  3. Watch for shell splitting: if the path contains spaces, quote it; note sqlmap splits multiple --postprocess scripts on commas.
  4. Confirm file permissions allow the running user to read the script.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/core/option.py:1072 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/008f1a178143858c. Report an issue: GitHub.

Appendix: source

Thrown at lib/core/option.py:1072

def _setPostprocessFunctions():
    """
    Loads postprocess function(s) from given script(s)
    """

    if conf.postprocess:
        for script in re.split(PARAMETER_SPLITTING_REGEX, conf.postprocess):
            found = False
            function = None

            script = safeFilepathEncode(script.strip())

            try:
                if not script:
                    continue

                if not os.path.exists(script):
                    errMsg = "postprocess script '%s' does not exist" % script
                    raise SqlmapFilePathException(errMsg)

                elif not script.endswith(".py"):
                    errMsg = "postprocess script '%s' should have an extension '.py'" % script
                    raise SqlmapSyntaxException(errMsg)
            except UnicodeDecodeError:
                errMsg = "invalid character provided in option '--postprocess'"
                raise SqlmapSyntaxException(errMsg)

            dirname, filename = os.path.split(script)
            dirname = os.path.abspath(dirname)

            infoMsg = "loading postprocess module '%s'" % filename[:-3]
            logger.info(infoMsg)

            if not os.path.exists(os.path.join(dirname, "__init__.py")):
                errMsg = "make sure that there is an empty file '__init__.py' "
                errMsg += "inside of postprocess scripts directory '%s'" % dirname
                raise SqlmapGenericException(errMsg)

View on GitHub (pinned to 0a35b20e39)