sqlmapproject/sqlmap · error · SqlmapFilePathException

specified HTTP request file

Error message

specified HTTP request file '%s' does not exist

What it means

Request-file mode (-r): one of the files matched by conf.requestFile (after splitting and user-path expansion) failed checkFile, meaning the raw HTTP request file does not exist or is unreadable; the path is included in the message.

Solutions

  1. Fix the -r path/typo or use an absolute path to the saved request file
  2. Ensure each comma-separated entry in -r is a readable file
  3. Verify working directory when using relative paths
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/core/option.py:314 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/201e8d9d6371ec14. Report an issue: GitHub.

Appendix: source

Thrown at lib/core/option.py:314

    FORMATTER._format = FORMATTER.format
    FORMATTER.format = format

def _setRequestFromFile():
    """
    This function checks if the way to make a HTTP request is through supplied
    textual file, parses it and saves the information into the knowledge base.
    """

    if conf.requestFile:
        for requestFile in re.split(PARAMETER_SPLITTING_REGEX, conf.requestFile):
            requestFile = safeExpandUser(requestFile)
            url = None
            seen = set()

            if not checkFile(requestFile, False):
                errMsg = "specified HTTP request file '%s' " % requestFile
                errMsg += "does not exist"
                raise SqlmapFilePathException(errMsg)

            infoMsg = "parsing HTTP request from '%s'" % requestFile
            logger.info(infoMsg)

            for target in parseRequestFile(requestFile):
                url = target[0]
                if url not in seen:
                    kb.targets.add(target)
                    if len(kb.targets) > 1:
                        conf.multipleTargets = True
                    seen.add(url)

            if url is None:
                errMsg = "specified file '%s' " % requestFile
                errMsg += "does not contain a usable HTTP request (with parameters)"
                raise SqlmapDataException(errMsg)

    if conf.secondReq:

View on GitHub (pinned to 0a35b20e39)