{"record":{"id":"8229a0289b40de6e","repo":"sqlmapproject/sqlmap","slug":"option-tor-is-incompatible-with-switch-os-p","errorCode":null,"errorMessage":"option '--tor' is incompatible with switch '--os-pwn'","messagePattern":"option '--tor' is incompatible with switch '--os-pwn'","errorType":"exception","errorClass":"SqlmapSyntaxException","httpStatus":null,"severity":"error","filePath":"lib/core/option.py","lineNumber":2887,"sourceCode":"    if conf.api and not conf.configFile:\n        errMsg = \"switch '--api' requires usage of option '-c'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.data and conf.nullConnection:\n        errMsg = \"option '--data' is incompatible with switch '--null-connection'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.string and conf.nullConnection:\n        errMsg = \"option '--string' is incompatible with switch '--null-connection'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.notString and conf.nullConnection:\n        errMsg = \"option '--not-string' is incompatible with switch '--null-connection'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.tor and conf.osPwn:\n        errMsg = \"option '--tor' is incompatible with switch '--os-pwn'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.noCast and conf.hexConvert:\n        errMsg = \"switch '--no-cast' is incompatible with switch '--hex'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.crawlDepth:\n        try:\n            xrange(conf.crawlDepth)\n        except OverflowError as ex:\n            errMsg = \"invalid value used for option '--crawl' ('%s')\" % getSafeExString(ex)\n            raise SqlmapSyntaxException(errMsg)\n\n    if conf.dumpAll and conf.search:\n        errMsg = \"switch '--dump-all' is incompatible with switch '--search'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.string and conf.notString:\n        errMsg = \"option '--string' is incompatible with switch '--not-string'\"","sourceCodeStart":2869,"sourceCodeEnd":2905,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/option.py#L2869-L2905","documentation":"Startup mutual-exclusivity guard in _basicOptionValidation: --tor routes traffic through the Tor SOCKS proxy, while --os-pwn (out-of-band shell via Metasploit) needs a direct reverse connection to the target that cannot run through Tor. Fires when both conf.tor and conf.osPwn are set.","triggerScenarios":"Thrown at lib/core/option.py:2887 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove --tor for this run so the OOB payload can connect back directly","Use a less aggressive technique (e.g. --os-shell without Tor constraints) or drop --os-pwn"],"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"}