{"record":{"id":"527b1b6aac094ecf","repo":"sqlmapproject/sqlmap","slug":"value-for-option-alert-must-be-valid-operating","errorCode":null,"errorMessage":"value for option '--alert' must be valid operating system command(s)","messagePattern":"value for option '--alert' must be valid operating system command\\(s\\)","errorType":"validation","errorClass":"SqlmapSyntaxException","httpStatus":null,"severity":"error","filePath":"lib/core/option.py","lineNumber":3079,"sourceCode":"            errMsg = \"option '--skip' is incompatible with option '-p'\"\n            raise SqlmapSyntaxException(errMsg)\n\n    if conf.rParam and conf.testParameter:\n        if intersect(conf.rParam, conf.testParameter):\n            errMsg = \"option '--randomize' is incompatible with option '-p'\"\n            raise SqlmapSyntaxException(errMsg)\n\n    if conf.mobile and conf.agent:\n        errMsg = \"switch '--mobile' is incompatible with option '--user-agent'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.proxy and conf.ignoreProxy:\n        errMsg = \"option '--proxy' is incompatible with switch '--ignore-proxy'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.alert and conf.alert.startswith('-'):\n        errMsg = \"value for option '--alert' must be valid operating system command(s)\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.timeSec < 1:\n        errMsg = \"value for option '--time-sec' must be a positive integer\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.hashFile and any((conf.direct, conf.url, conf.logFile, conf.bulkFile, conf.googleDork, conf.configFile, conf.requestFile, conf.updateAll, conf.smokeTest, conf.wizard, conf.dependencies, conf.purge, conf.listTampers)):\n        errMsg = \"option '--crack' should be used as a standalone\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if isinstance(conf.uCols, six.string_types):\n        if not conf.uCols.isdigit() and (\"-\" not in conf.uCols or len(conf.uCols.split(\"-\")) != 2):\n            errMsg = \"value for option '--union-cols' must be a range with hyphon \"\n            errMsg += \"(e.g. 1-10) or integer value (e.g. 5)\"\n            raise SqlmapSyntaxException(errMsg)\n\n    if conf.dbmsCred and ':' not in conf.dbmsCred:\n        errMsg = \"value for option '--dbms-cred' must be in \"\n        errMsg += \"format <username>:<password> (e.g. \\\"root:pass\\\")\"","sourceCodeStart":3061,"sourceCodeEnd":3097,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/option.py#L3061-L3097","documentation":"Startup value-validation guard in _basicOptionValidation: the command from --alert (conf.alert) is executed in a shell after a finding; if it starts with '-' the check startswith('-') assumes it is not a valid command (likely a misplaced flag). The error fires to catch options accidentally parsed as the --alert value.","triggerScenarios":"Thrown at lib/core/option.py:3079 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a real OS command, e.g. --alert='ls -la' (quote it so the flag-like text is part of the command)","Check argument ordering/quoting so a following option is not swallowed by --alert","Remove --alert if no notification command is needed"],"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"}