{"record":{"id":"87920760a6768f62","repo":"kgretzky/evilginx2","slug":"set-custom-parameters-for-the-child-phishlet-using","errorCode":null,"errorMessage":"set custom parameters for the child phishlet using format 'param1=value1 param2=value2'","messagePattern":"set custom parameters for the child phishlet using format 'param1=value1 param2=value2'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/terminal.go","lineNumber":578,"sourceCode":"\treturn fmt.Errorf(\"invalid syntax: %s\", args)\n}\n\nfunc (t *Terminal) handlePhishlets(args []string) error {\n\tpn := len(args)\n\n\tif pn >= 3 && args[0] == \"create\" {\n\t\tpl, err := t.cfg.GetPhishlet(args[1])\n\t\tif err == nil {\n\t\t\tparams := make(map[string]string)\n\n\t\t\tvar create_ok bool = true\n\t\t\tif pl.isTemplate {\n\t\t\t\tfor n := 3; n < pn; n++ {\n\t\t\t\t\tval := args[n]\n\n\t\t\t\t\tsp := strings.Index(val, \"=\")\n\t\t\t\t\tif sp == -1 {\n\t\t\t\t\t\treturn fmt.Errorf(\"set custom parameters for the child phishlet using format 'param1=value1 param2=value2'\")\n\t\t\t\t\t}\n\t\t\t\t\tk := val[:sp]\n\t\t\t\t\tv := val[sp+1:]\n\n\t\t\t\t\tparams[k] = v\n\n\t\t\t\t\tlog.Info(\"adding parameter: %s='%s'\", k, v)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif create_ok {\n\t\t\t\tchild_name := args[1] + \":\" + args[2]\n\t\t\t\terr := t.cfg.AddSubPhishlet(child_name, args[1], params)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlog.Error(\"%v\", err)\n\t\t\t\t} else {\n\t\t\t\t\tt.cfg.SaveSubPhishlets()\n\t\t\t\t\tlog.Info(\"created child phishlet: %s\", child_name)","sourceCodeStart":560,"sourceCodeEnd":596,"githubUrl":"https://github.com/kgretzky/evilginx2/blob/4c0988a1d9db4d172a185e979a38bfd0efdb5830/core/terminal.go#L560-L596","documentation":"When creating a child phishlet from a template phishlet (`phishlets create <parent> <name> ...`), every extra argument from position 3 onward must be a `key=value` custom parameter. If any argument lacks an `=` sign, handlePhishlets returns this error because the template parameter cannot be parsed.","triggerScenarios":"Running `phishlets create <template-name> <child-name> <param>` where one or more parameter tokens after the child name do not contain `=` (e.g. `phishlets create o365 mycorp domain` instead of `domain=mycorp.com`).","commonSituations":"Operator forgot values for template-required parameters; used space instead of `=`; copied a command where shell splitting removed the `=`; passed only the child name for a template phishlet that requires params.","solutions":["Append `=value` to each parameter token: `phishlets create <parent> <child> param1=value1 param2=value2`","Check the parent phishlet's required template parameters (see phishlet YAML custom: section) and supply all of them","Quote parameters containing spaces or special shell characters"],"exampleFix":"// before\nphishlets create o365 corp domain\n// after\nphishlets create o365 corp domain=corp.example.com","handlingStrategy":"validation","validationCode":"func validateCreateArgs(extra []string) error {\n    for _, v := range extra {\n        if !strings.Contains(v, \"=\") {\n            return fmt.Errorf(\"parameter %q must be key=value\", v)\n        }\n    }\n    return nil\n}","typeGuard":"func isKeyValue(s string) bool { return strings.Index(s, \"=\") > 0 }","tryCatchPattern":"if err := t.handlePhishlets(args); err != nil {\n    if strings.Contains(err.Error(), \"param1=value1\") {\n        log.Info(\"usage: phishlets create <parent> <child> key=value ...\")\n    } else { log.Error(\"%v\", err) }\n}","preventionTips":["Always pass key=value pairs for template phishlets","Quote args containing special characters","Check the phishlet YAML 'custom:' section for required params"],"tags":["cli","phishlet","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"}