{"record":{"id":"935ae1a1014e173e","repo":"sqlmapproject/sqlmap","slug":"proxy-authentication-credentials-value-must-be-in","errorCode":null,"errorMessage":"proxy authentication credentials value must be in format username:password","messagePattern":"proxy authentication credentials value must be in format username:password","errorType":"exception","errorClass":"SqlmapSyntaxException","httpStatus":null,"severity":"error","filePath":"lib/core/option.py","lineNumber":1296,"sourceCode":"            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\n\n            if not all((scheme, hasattr(PROXY_TYPE, scheme), hostname, port)):\n                errMsg = \"proxy value must be in format '(%s)://address:port'\" % \"|\".join(_[0].lower() for _ in getPublicTypeMembers(PROXY_TYPE))\n                raise SqlmapSyntaxException(errMsg)\n\n            if conf.proxyCred:\n                _ = re.search(r\"\\A(.*?):(.*?)\\Z\", conf.proxyCred)\n                if not _:\n                    errMsg = \"proxy authentication credentials \"\n                    errMsg += \"value must be in format username:password\"\n                    raise SqlmapSyntaxException(errMsg)\n                else:\n                    username = _.group(1)\n                    password = _.group(2)\n\n            if scheme in (PROXY_TYPE.SOCKS4, PROXY_TYPE.SOCKS5):\n                proxyHandler.proxies = {}\n\n                if scheme == PROXY_TYPE.SOCKS4:\n                    warnMsg = \"SOCKS4 does not support resolving (DNS) names (i.e. causing DNS leakage)\"\n                    singleTimeWarnMessage(warnMsg)\n\n                socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5 if scheme == PROXY_TYPE.SOCKS5 else socks.PROXY_TYPE_SOCKS4, hostname, port, username=username, password=password)\n                socks.wrapmodule(_http_client)\n            else:\n                socks.unwrapmodule(_http_client)\n\n                if conf.proxyCred:\n                    # Reference: http://stackoverflow.com/questions/34079/how-to-specify-an-authenticated-proxy-for-a-python-http-connection","sourceCodeStart":1278,"sourceCodeEnd":1314,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/option.py#L1278-L1314","documentation":"When --proxy-cred is given alongside a proxy, _setHTTPHandlers matches the value against a strict 'username:password' regular expression. This validation fires when the credentials do not match — missing colon, empty username/password, or extra segments — raising SqlmapSyntaxException; the credentials never reach the proxy authentication handler.","triggerScenarios":"Thrown at lib/core/option.py:1296 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Format the value as `username:password`, e.g. `--proxy-cred=\"john:secret\"`.","Do not URL-encode or base64-encode the credentials; pass them in plaintext and let sqlmap handle encoding.","Ensure exactly one colon separates username and password (escape or change passwords containing colons if needed).","If the password contains special shell characters, quote the whole argument."],"exampleFix":null,"handlingStrategy":"validation","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"}