{"record":{"id":"0159c61b225622f7","repo":"kgretzky/evilginx2","slug":"incorrect-number-of-arguments","errorCode":null,"errorMessage":"incorrect number of arguments","messagePattern":"incorrect number of arguments","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"core/terminal.go","lineNumber":736,"sourceCode":"\t\treturn nil\n\t}\n\tif pn > 0 {\n\t\tswitch args[0] {\n\t\tcase \"create\":\n\t\t\tif pn == 2 {\n\t\t\t\t_, err := t.cfg.GetPhishlet(args[1])\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tl := &Lure{\n\t\t\t\t\tPath:     \"/\" + GenRandomString(8),\n\t\t\t\t\tPhishlet: args[1],\n\t\t\t\t}\n\t\t\t\tt.cfg.AddLure(args[1], l)\n\t\t\t\tlog.Info(\"created lure with ID: %d\", len(t.cfg.lures)-1)\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"incorrect number of arguments\")\n\t\tcase \"get-url\":\n\t\t\tif pn >= 2 {\n\t\t\t\tl_id, err := strconv.Atoi(strings.TrimSpace(args[1]))\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"get-url: %v\", err)\n\t\t\t\t}\n\t\t\t\tl, err := t.cfg.GetLure(l_id)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"get-url: %v\", err)\n\t\t\t\t}\n\t\t\t\tpl, err := t.cfg.GetPhishlet(l.Phishlet)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"get-url: %v\", err)\n\t\t\t\t}\n\t\t\t\tbhost, ok := t.cfg.GetSiteDomain(pl.Name)\n\t\t\t\tif !ok || len(bhost) == 0 {\n\t\t\t\t\treturn fmt.Errorf(\"no hostname set for phishlet '%s'\", pl.Name)\n\t\t\t\t}","sourceCodeStart":718,"sourceCodeEnd":754,"githubUrl":"https://github.com/kgretzky/evilginx2/blob/4c0988a1d9db4d172a185e979a38bfd0efdb5830/core/terminal.go#L718-L754","documentation":"The `lures create <phishlet>` command requires exactly the phishlet name argument; if the argument count doesn't match what the create branch expects, handleLures returns 'incorrect number of arguments'. Lures are per-phishlet phishing link definitions that require an existing phishlet.","triggerScenarios":"Running `lures create` with no phishlet name, or with extra unexpected arguments such that pn doesn't satisfy the create branch conditions in handleLures.","commonSituations":"Forgot the phishlet argument; pasted a multi-word phishlet name that shell-split; used syntax from a different fork where create takes more params.","solutions":["Run `lures create <phishlet-name>` with exactly one argument naming an existing phishlet","Verify the phishlet exists and is not a template (`phishlets` listing) before creating the lure","Check the handleLures source for the exact expected argument count in your version"],"exampleFix":"// before\nlures create\n// after\nlures create o365:corp","handlingStrategy":"validation","validationCode":"func validateLuresCreate(args []string) error {\n    if len(args) != 2 { return fmt.Errorf(\"usage: lures create <phishlet>\") }\n    if _, err := t.cfg.GetPhishlet(args[1]); err != nil { return err }\n    return nil\n}","typeGuard":null,"tryCatchPattern":"if err := t.handleLures(args); err != nil {\n    if strings.Contains(err.Error(), \"incorrect number of arguments\") {\n        log.Info(\"usage: lures create <phishlet>\")\n    } else { log.Error(\"%v\", err) }\n}","preventionTips":["Pass exactly one phishlet name to lures create","Quote phishlet names containing ':' so the shell keeps them as one token","Confirm the phishlet exists before creating a lure"],"tags":["cli","lures","syntax-error"],"backgroundTag":"cli-invalid-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"}