{"record":{"id":"b0b3d4818d41c9a6","repo":"sqlmapproject/sqlmap","slug":"server-requires-tds-encryption-the-dependency-fre","errorCode":null,"errorMessage":"server requires TDS encryption; the dependency-free client supports cleartext only","messagePattern":"server requires TDS encryption; the dependency-free client supports cleartext only","errorType":"exception","errorClass":"NotSupportedError","httpStatus":null,"severity":"error","filePath":"extra/dbwire/tds.py","lineNumber":98,"sourceCode":"            break\n    return b\"\".join(chunks)\n\n# ---- PRELOGIN ----------------------------------------------------------------------------------------\n\ndef _prelogin(sock):\n    ver = struct.pack(\">IH\", 0x11000000, 0)\n    enc = b\"\\x02\"  # ENCRYPT_NOT_SUP\n    tokens = b\"\\x00\" + struct.pack(\">HH\", 11, len(ver))\n    tokens += b\"\\x01\" + struct.pack(\">HH\", 11 + len(ver), len(enc))\n    tokens += b\"\\xff\"\n    _send_message(sock, _PKT_PRELOGIN, tokens + ver + enc)\n    body = _read_message(sock)\n    off = 0\n    while off < len(body) and _u8(body, off) != 0xff:\n        token = _u8(body, off)\n        toff, tlen = struct.unpack(\">HH\", body[off + 1:off + 5])\n        if token == 0x01 and _u8(body, toff) == 0x03:  # server requires encryption\n            raise NotSupportedError(\"server requires TDS encryption; the dependency-free client supports cleartext only\")\n        off += 5\n\n# ---- LOGIN7 ------------------------------------------------------------------------------------------\n\ndef _encode_password(password):\n    out = bytearray()\n    for b in bytearray(password.encode(\"utf-16-le\")):\n        b = ((b << 4) & 0xf0) | ((b >> 4) & 0x0f)\n        out.append(b ^ 0xa5)\n    return bytes(out)\n\ndef _login7(sock, user, password, database, hostname=\"dbwire\", appname=\"dbwire\"):\n    fields = [\n        hostname.encode(\"utf-16-le\"),\n        (user or \"\").encode(\"utf-16-le\"),\n        _encode_password(password or \"\"),\n        appname.encode(\"utf-16-le\"),\n        b\"\",                              # server name","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/extra/dbwire/tds.py#L80-L116","documentation":"Error \"server requires TDS encryption; the dependency-free client supports cleartext only\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at extra/dbwire/tds.py:98 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}