sqlmapproject/sqlmap · error · InterfaceError

connection closed by server

Error message

connection closed by server

What it means

Error "connection closed by server" thrown in sqlmapproject/sqlmap.

Source

Thrown at extra/dbwire/__init__.py:124

    except Exception:
        pass

def recvn(sock, n):
    """
    Read exactly n bytes off `sock`, or raise - every wire protocol here is framed, so a short read is a
    desynchronized stream, not a smaller message.

    Shared because it was five identical copies: a fix to the recv loop has to land once, not per module.
    """

    buf = b""
    while len(buf) < n:
        try:
            chunk = sock.recv(n - len(buf))
        except (socket.error, OSError) as ex:
            raise connection_lost(ex)
        if not chunk:
            raise InterfaceError("connection closed by server")
        buf += chunk
    return buf

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at extra/dbwire/__init__.py:124 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26). Data as JSON: /api/errors/be42fc25d73ad384. Report an issue: GitHub.