kgretzky/evilginx2 · error

missing custom parameter values during initalization: %v

Error message

missing custom parameter values during initalization: %v

What it means

When a phishlet is a template (defines a `params` section), required custom parameters must be supplied at load/init time. Any required parameter not provided remains in the prequired map, and the loader fails with this error listing the missing parameter names (note the 'initalization' typo is from the source). It ensures template phishlets are fully instantiated before use.

Source

Thrown at core/phishlet.go:350

				pall[param.Name] = val

				if param.Required != nil && *param.Required == true {
					prequired[param.Name] = val
				}
			}
			for k, v := range *customParams {
				if _, ok := pall[k]; !ok {
					log.Warning("phishlets: [%s] incorrect parameter key specified: %s", site, k)
					delete(*customParams, k)
					continue
				}
				params[k] = v
				if _, ok := prequired[k]; ok {
					delete(prequired, k)
				}
			}
			if len(prequired) > 0 {
				return fmt.Errorf("missing custom parameter values during initalization: %v", prequired)
			}
			p.isTemplate = false
			p.customParams = params
		} else {
			for _, param := range *fp.Params {
				val := ""
				if param.Required != nil && *param.Required {
					val += "(required)"
				} else if param.Default != nil {
					val = *param.Default
				}

				p.customParams[param.Name] = val
			}
		}

		/*
			if customParams != nil {

View on GitHub (pinned to 4c0988a1d9)

Solutions

  1. Provide values for every listed required parameter when loading/activating the phishlet (names are printed in the error)
  2. Check the phishlet's `params` section for required: true entries and their exact names
  3. Fix parameter-name typos — keys must match exactly
  4. Set defaults in the phishlet's params section if the parameter is optional in practice

Example fix

// before
pl, err := cfg.LoadPhishlet(name, path, map[string]string{"domain": "example.com"})
// after (supply all required params, e.g. also 'sub')
pl, err := cfg.LoadPhishlet(name, path, map[string]string{"domain": "example.com", "sub": "login"})
Defensive patterns

Strategy: validation

Validate before calling

// verify all required params before LoadPhishlet
for _, param := range phishletYAML.Params {
    if param.Required {
        if _, ok := supplied[param.Name]; !ok {
            return fmt.Errorf("missing required param: %s", param.Name)
        }
    }
}

Type guard

func hasRequiredParams(required []string, supplied map[string]string) bool {
    for _, r := range required {
        if _, ok := supplied[r]; !ok {
            return false
        }
    }
    return true
}

Try / catch

if err := cfg.LoadPhishlet(name, path, params); err != nil {
    if strings.Contains(err.Error(), "missing custom parameter") {
        log.Error("provide all required template params: %v", err)
    }
}

Prevention

When it happens

Trigger: Loading a parametrized phishlet via LoadPhishlet(..., params) where the supplied params map omits one or more parameters declared with `required: true` in the phishlet's `params` section — e.g. missing `domain` or `subdomain` params needed to expand `{domain}` placeholders.

Common situations: Activating a template phishlet with `phishlet set`/`activate` without filling all required custom params, copying a phishlet that expects domain parameters but providing only some, or a typo in the parameter name so it doesn't match the required key.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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