{"record":{"id":"426b573bc1140102","repo":"sqlmapproject/sqlmap","slug":"invalid-proxy-address-s-s","errorCode":null,"errorMessage":"invalid proxy address '%s' ('%s')","messagePattern":"invalid proxy address '(.+?)' \\('(.+?)'\\)","errorType":"exception","errorClass":"SqlmapSyntaxException","httpStatus":null,"severity":"error","filePath":"lib/core/option.py","lineNumber":1267,"sourceCode":"            conf.proxyList = conf.proxyList[1:] + conf.proxyList[:1]\n\n            if len(conf.proxyList) > 1:\n                infoMsg = \"loading proxy '%s' from a supplied proxy list file\" % conf.proxy\n                logger.info(infoMsg)\n\n        elif not conf.proxy:\n            if conf.hostname in (\"localhost\", \"127.0.0.1\") or conf.ignoreProxy:\n                proxyHandler.proxies = {}\n\n        if conf.proxy:\n            debugMsg = \"setting the HTTP/SOCKS proxy for all HTTP requests\"\n            logger.debug(debugMsg)\n\n            try:\n                _ = _urllib.parse.urlsplit(conf.proxy)\n            except Exception as ex:\n                errMsg = \"invalid proxy address '%s' ('%s')\" % (conf.proxy, getSafeExString(ex))\n                raise SqlmapSyntaxException(errMsg)\n\n            match = re.search(r\"\\A([^:]*):([^:]*)@([^@]+)\\Z\", _.netloc)\n            if match:\n                username, password = match.group(1), match.group(2)\n            else:\n                username, password = None, None\n\n            hostnamePort = _.netloc.rsplit('@', 1)[-1].rsplit(\":\", 1)\n\n            scheme = _.scheme.upper()\n            hostname = hostnamePort[0]\n            port = None\n\n            if len(hostnamePort) == 2:\n                try:\n                    port = int(hostnamePort[1])\n                except:\n                    pass  # drops into the next check block","sourceCodeStart":1249,"sourceCodeEnd":1285,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/option.py#L1249-L1285","documentation":"In _setHTTPHandlers, when a --proxy value is supplied, sqlmap parses it with urllib.parse.urlsplit inside try/except. If urlsplit (or subsequent handling) raises ValueError — e.g. malformed brackets in an IPv6 host, invalid port syntax, or characters the parser rejects — the guard re-raises as SqlmapDataException with the proxy string and the parser's error message embedded.","triggerScenarios":"Thrown at lib/core/option.py:1267 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the --proxy value to a well-formed URL, e.g. `http://host:port` or `socks5://host:port`.","For IPv6 hosts, wrap the address in square brackets: `http://[::1]:8080`.","Remove stray characters, spaces, or a duplicated scheme (e.g. avoid `http://http://...`).","Test the URL with `python -c \"import urllib.parse; print(urllib.parse.urlsplit('<proxy>'))\"` to confirm it parses."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}