{"record":{"id":"3b978f6efd697b2d","repo":"kgretzky/evilginx2","slug":"invalid-syntax-s","errorCode":null,"errorMessage":"invalid syntax: %s","messagePattern":"invalid syntax: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/terminal.go","lineNumber":273,"sourceCode":"\t\t\tcase \"admin_url\":\n\t\t\t\tt.cfg.SetGoPhishAdminUrl(args[2])\n\t\t\t\treturn nil\n\t\t\tcase \"api_key\":\n\t\t\t\tt.cfg.SetGoPhishApiKey(args[2])\n\t\t\t\treturn nil\n\t\t\tcase \"insecure\":\n\t\t\t\tswitch args[2] {\n\t\t\t\tcase \"true\":\n\t\t\t\t\tt.cfg.SetGoPhishInsecureTLS(true)\n\t\t\t\t\treturn nil\n\t\t\t\tcase \"false\":\n\t\t\t\t\tt.cfg.SetGoPhishInsecureTLS(false)\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn fmt.Errorf(\"invalid syntax: %s\", args)\n}\n\nfunc (t *Terminal) handleBlacklist(args []string) error {\n\tpn := len(args)\n\tif pn == 0 {\n\t\tmode := t.cfg.GetBlacklistMode()\n\t\tip_num, mask_num := t.p.bl.GetStats()\n\t\tlog.Info(\"blacklist mode set to: %s\", mode)\n\t\tlog.Info(\"blacklist: loaded %d ip addresses and %d ip masks\", ip_num, mask_num)\n\n\t\treturn nil\n\t} else if pn == 1 {\n\t\tswitch args[0] {\n\t\tcase \"all\":\n\t\t\tt.cfg.SetBlacklistMode(args[0])\n\t\t\treturn nil\n\t\tcase \"unauth\":\n\t\t\tt.cfg.SetBlacklistMode(args[0])","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/kgretzky/evilginx2/blob/4c0988a1d9db4d172a185e979a38bfd0efdb5830/core/terminal.go#L255-L291","documentation":"handleConfig validates arguments to the 'config' terminal command; when the subcommand/argument pattern matches none of the accepted forms (e.g. config domain, config ipv4, config unfurl, config tls ...), it returns this error echoing the raw args slice. It is a CLI syntax error, not a runtime failure.","triggerScenarios":"Running a 'config' command in the goPhish terminal with an unrecognized subcommand or wrong argument count, e.g. 'config domain' with no value, 'config foo bar', or extra tokens so no switch/if branch matches.","commonSituations":"Typing 'config domains example.com' (plural), forgetting the value argument ('config ipv4' without true/false), typos in subcommands like 'config tls_domain'.","solutions":["Run 'help config' to list accepted syntaxes","Use exact subcommands: domain, ip/ipv4, https/insecure, unfurl, etc., with the required value","Check argument count: most forms need exactly 2 args (subcommand + value)"],"exampleFix":"// before (shell)\nconfig domains evil.example.com\n// after\nconfig domain evil.example.com","handlingStrategy":"validation","validationCode":"validConfigArgs := map[string]int{\"domain\":1,\"ip\":1,\"ipv4\":1,\"unfurl\":1,\"https\":1,\"insecure\":1}\n// check: len(args)==2 && validConfigArgs[args[0]]==1","typeGuard":null,"tryCatchPattern":"if err := t.handleConfig(args); err != nil {\n\tfmt.Fprintln(os.Stderr, \"usage: config <domain|ip|unfurl|...> <value>\", err)\n}","preventionTips":["Run 'help config' before unfamiliar subcommands","Use exact singular names ('config domain', not 'config domains')","Script the terminal with full two-token forms only"],"tags":["cli","terminal","syntax"],"backgroundTag":"invalid-command-syntax","analyzedSha":"4c0988a1d9db4d172a185e979a38bfd0efdb5830","analyzedAt":"2026-09-05T19:23:07.238Z","contentChangedAt":"2026-09-05T19:23:07.238Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}