{"record":{"id":"bc743095a522eb00","repo":"sqlmapproject/sqlmap","slug":"could-not-connect-to-s-s-s-bc7430","errorCode":null,"errorMessage":"could not connect to '%s:%s' (%s)","messagePattern":"could not connect to '(.+?):(.+?)' \\((.+?)\\)","errorType":"exception","errorClass":"OperationalError","httpStatus":null,"severity":"error","filePath":"extra/dbwire/sybase.py","lineNumber":411,"sourceCode":"            elif token == _TOKEN_RETURNSTATUS:\n                off += 4\n            elif token == _TOKEN_ROWFMT2:\n                raise NotSupportedError(\"the server answered with the wide ROWFMT2 format\")\n            else:\n                off += 2 + _u16(data, off)      # every other TDS 5 token is 2-byte length prefixed\n        if error is not None:\n            if login:\n                raise OperationalError(error[1])\n            _raise_server_error(*error)\n        return description, rows, affected\n\ndef connect(host=None, port=5000, user=None, password=None, database=None, connect_timeout=None, **kwargs):\n    charset, codec = kwargs.get(\"charset\", \"utf8\"), \"utf-8\"\n    try:\n        sock = socket.create_connection((host or \"localhost\", int(port or 5000)), timeout=connect_timeout)\n        keepalive(sock)\n    except (socket.error, socket.timeout) as ex:\n        raise OperationalError(\"could not connect to '%s:%s' (%s)\" % (host, port, ex))\n\n    connection = Connection(sock, codec)\n    try:\n        login = _loginrec(\"dbwire\", user or \"\", password or \"\", \"dbwire\", host or \"localhost\", charset, _PACKET_SIZE)\n        _send_message(sock, _PKT_LOGIN, login, _LOGIN_CHUNK)\n        connection._read_response(login=True)\n        handshake_done(sock)\n        if database:\n            if not _IDENTIFIER.match(database):\n                raise ProgrammingError(\"unsupported database name %r\" % database)\n            connection._query(\"USE %s\" % database)\n    except (DatabaseError, InterfaceError):\n        connection.close()\n        raise\n    except Exception as ex:\n        connection.close()\n        raise OperationalError(\"Sybase login failed (%s)\" % ex)\n    return connection","sourceCodeStart":393,"sourceCodeEnd":429,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/extra/dbwire/sybase.py#L393-L429","documentation":"Error \"could not connect to '%s:%s' (%s)\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at extra/dbwire/sybase.py:411 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"}