sqlmapproject/sqlmap · error · SqlmapDataException

local host address is missing

Error message

local host address is missing

What it means

Guard in _selectLhost: the local (attacker) address for the icmpsh tunnel is missing and could not be auto-detected; in batch mode an empty answer raises immediately since the tunnel has no local endpoint.

Solutions

  1. Provide the local IP interactively or via configuration
  2. Ensure the machine has a routable IPv4 address so auto-detection succeeds
  3. Disable batch mode to allow prompting
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/takeover/icmpsh.py:72 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/979bb64a58c56b02. Report an issue: GitHub.

Appendix: source

Thrown at lib/takeover/icmpsh.py:72

        message = "what is the local address? "

        if self.localIP:
            message += "[Enter for '%s' (detected)] " % self.localIP

        valid = None
        while not valid:
            valid = True
            address = readInput(message, default=self.localIP or "")

            try:
                socket.inet_aton(address)
            except socket.error:
                valid = False
            finally:
                valid = valid and re.search(r"\d+\.\d+\.\d+\.\d+", address) is not None

            if conf.batch and not address:
                raise SqlmapDataException("local host address is missing")
            elif address and not valid:
                warnMsg = "invalid local host address"
                logger.warning(warnMsg)

        return address

    def _prepareIngredients(self, encode=True):
        self.localIP = getattr(self, "localIP", None)
        self.remoteIP = getattr(self, "remoteIP", None)
        self.lhostStr = ICMPsh._selectLhost(self)
        self.rhostStr = ICMPsh._selectRhost(self)

    def _runIcmpshMaster(self):
        infoMsg = "running icmpsh master locally"
        logger.info(infoMsg)

        icmpshmaster(self.lhostStr, self.rhostStr)

View on GitHub (pinned to 0a35b20e39)