kgretzky/evilginx2 · error

phishlet '%s' is a template - you have to 'create' child phi

Error message

phishlet '%s' is a template - you have to 'create' child phishlet from it, with predefined parameters, before you can enable it.

What it means

Template phishlets are blueprints and cannot be enabled directly. Before `phishlets enable <name>`, you must create a child phishlet via `phishlets create <template> <child> param=value...` which bakes in the required custom parameters, then enable the child.

Source

Thrown at core/terminal.go:630

	} else if pn == 2 {
		switch args[0] {
		case "delete":
			err := t.cfg.DeleteSubPhishlet(args[1])
			if err != nil {
				log.Error("%v", err)
				return nil
			}
			t.cfg.SaveSubPhishlets()
			log.Info("deleted child phishlet: %s", args[1])
			return nil
		case "enable":
			pl, err := t.cfg.GetPhishlet(args[1])
			if err != nil {
				log.Error("%v", err)
				break
			}
			if pl.isTemplate {
				return fmt.Errorf("phishlet '%s' is a template - you have to 'create' child phishlet from it, with predefined parameters, before you can enable it.", args[1])
			}
			err = t.cfg.SetSiteEnabled(args[1])
			if err != nil {
				t.cfg.SetSiteDisabled(args[1])
				return err
			}
			t.manageCertificates(true)
			return nil
		case "disable":
			err := t.cfg.SetSiteDisabled(args[1])
			if err != nil {
				return err
			}
			t.manageCertificates(false)
			return nil
		case "hide":
			err := t.cfg.SetSiteHidden(args[1], true)
			if err != nil {

View on GitHub (pinned to 4c0988a1d9)

Solutions

  1. Create a child first: `phishlets create <template> <child> param1=value1 ...`
  2. Then enable the child: `phishlets enable <template>:<child>`
  3. Use the fully qualified child name (parent:child) if names are ambiguous
  4. List phishlets to confirm which entries are templates vs children

Example fix

// before
phishlets enable o365
// after
phishlets create o365 corp domain=corp.example.com
phishlets enable o365:corp
Defensive patterns

Strategy: validation

Validate before calling

pl, err := t.cfg.GetPhishlet(name)
if err == nil && pl.IsTemplate {
    return fmt.Errorf("%s is a template; run: phishlets create %s <child> key=value first", name, name)
}

Type guard

func isTemplatePhishlet(pl *Phishlet) bool { return pl != nil && pl.IsTemplate }

Try / catch

if err := enablePhishlet(name); err != nil {
    if strings.Contains(err.Error(), "is a template") {
        // fall back to creating a child phishlet
        createChildFromTemplate(name)
    }
}

Prevention

When it happens

Trigger: Running `phishlets enable <name>` where args[1] resolves via GetPhishlet to a phishlet with isTemplate=true (a base/template phishlet, not a created child).

Common situations: User enabled a freshly downloaded template phishlet without instantiating it; old workflows from versions without template phishlets; ambiguous phishlet name matched the template instead of the child.

Related errors


AI-assisted analysis of kgretzky/evilginx2@4c0988a1d9 (2026-09-05). Data as JSON: /api/errors/2ab2fc639ba00a72. Report an issue: GitHub.