{"record":{"id":"816062303fc1ff28","repo":"sqlmapproject/sqlmap","slug":"unexpected-connection-type","errorCode":null,"errorMessage":"unexpected connection type","messagePattern":"unexpected connection type","errorType":"exception","errorClass":"SqlmapDataException","httpStatus":null,"severity":"error","filePath":"lib/takeover/metasploit.py","lineNumber":280,"sourceCode":"        for connType, connStr in self._portData.items():\n            if self.connectionStr.startswith(connType):\n                return self._skeletonSelection(connStr, maxValue=65535, default=randomRange(1025, 65535))\n\n    def _selectRhost(self):\n        if self.connectionStr.startswith(\"bind\"):\n            message = \"what is the back-end DBMS address? [Enter for '%s' (detected)] \" % self.remoteIP\n            address = readInput(message, default=self.remoteIP)\n\n            if not address:\n                address = self.remoteIP\n\n            return address\n\n        elif self.connectionStr.startswith(\"reverse\"):\n            return None\n\n        else:\n            raise SqlmapDataException(\"unexpected connection type\")\n\n    def _selectLhost(self):\n        if self.connectionStr.startswith(\"reverse\"):\n            message = \"what is the local address? [Enter for '%s' (detected)] \" % self.localIP\n            address = readInput(message, default=self.localIP)\n\n            if not address:\n                address = self.localIP\n\n            return address\n\n        elif self.connectionStr.startswith(\"bind\"):\n            return None\n\n        else:\n            raise SqlmapDataException(\"unexpected connection type\")\n\n    def _selectConnection(self):","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/takeover/metasploit.py#L262-L298","documentation":"Error \"unexpected connection type\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/takeover/metasploit.py:280 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"}