sqlmapproject/sqlmap · error · NotSupportedError

only MAPI protocol v9 is supported

Error message

only MAPI protocol v9 is supported

What it means

The challenge's protocol field is not '9'. The client implements only MAPI protocol v9 and refuses to guess the framing of other versions.

Solutions

  1. Point at a MonetDB server speaking MAPI v9
  2. Extend _challenge_response with the protocol version the server offers
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at extra/dbwire/monetdb.py:69 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/dd922462486dc1c9. Report an issue: GitHub.

Appendix: source

Thrown at extra/dbwire/monetdb.py:69

    off = 0
    while True:
        chunk = data[off:off + _MAX_BLOCK]
        off += _MAX_BLOCK
        last = off >= len(data)
        try:
            sock.sendall(struct.pack("<H", (len(chunk) << 1) | (1 if last else 0)) + chunk)
        except (socket.error, OSError) as ex:
            raise connection_lost(ex)
        if last:
            break

def _challenge_response(challenge, user, password, database):
    parts = challenge.split(":")
    if len(parts) < 7 or parts[-1] != "":
        raise OperationalError("invalid MonetDB challenge")
    salt, server_type, protocol, hashes = parts[0], parts[1], parts[2], parts[3]
    if protocol != "9":
        raise NotSupportedError("only MAPI protocol v9 is supported")
    if server_type == "merovingian":  # proxy stage: authenticate as merovingian, real creds go to the mserver
        user, password = "merovingian", ""
    pwalgo = parts[5]
    try:
        password = hashlib.new(pwalgo, password.encode("utf-8")).hexdigest()
    except ValueError:
        raise NotSupportedError("unsupported MonetDB password algorithm: %s" % pwalgo)
    pwhash = None
    for algo in hashes.split(","):
        try:
            h = hashlib.new(algo)
        except ValueError:
            continue
        h.update(password.encode("utf-8"))
        h.update(salt.encode("utf-8"))
        pwhash = "{%s}%s" % (algo, h.hexdigest())
        break
    if pwhash is None:

View on GitHub (pinned to 0a35b20e39)