kgretzky/evilginx2 · error
phishlet '%s' not found
Error message
phishlet '%s' not found
What it means
GetPhishlet looks up the phishlet map by site name and the key is absent — the named phishlet was never created or its domain has not been set up/activated. This is a map-miss guard on the 'site' input string.
Source
Thrown at core/config.go:760
for _, l := range c.lures {
if l.Phishlet == site {
pl, err := c.GetPhishlet(site)
if err == nil {
if host == l.Hostname || host == pl.GetLandingPhishHost() {
if l.Path == path {
return l, nil
}
}
}
}
}
return nil, fmt.Errorf("lure for path '%s' not found", path)
}
func (c *Config) GetPhishlet(site string) (*Phishlet, error) {
pl, ok := c.phishlets[site]
if !ok {
return nil, fmt.Errorf("phishlet '%s' not found", site)
}
return pl, nil
}
func (c *Config) GetPhishletNames() []string {
return c.phishletNames
}
func (c *Config) GetSiteDomain(site string) (string, bool) {
if o, ok := c.phishletConfig[site]; ok {
return o.Hostname, ok
}
return "", false
}
func (c *Config) GetSiteUnauthUrl(site string) (string, bool) {
if o, ok := c.phishletConfig[site]; ok {
return o.UnauthUrl, okView on GitHub (pinned to 4c0988a1d9)
Solutions
- Call cfg.GetPhishletNames() (or IsPhishletName) to confirm the site exists before lookup
- Check the phishlet file exists in the phishlets directory and loaded without errors
- Fix the site name spelling
Example fix
// before
pl, err := cfg.GetPhishlet(siteName)
// after
if !containsString(siteName, cfg.GetPhishletNames()) {
return fmt.Errorf("phishlet %s is not loaded", siteName)
}
pl, err := cfg.GetPhishlet(siteName) Defensive patterns
Strategy: type-guard
Validate before calling
func phishletExists(cfg *core.Config, site string) bool {
for _, n := range cfg.GetPhishletNames() {
if n == site { return true }
}
return false
} Try / catch
pl, err := cfg.GetPhishlet(site)
if err != nil {
return fmt.Errorf("phishlet %q not loaded: %w", site, err)
} Prevention
- Validate site names against GetPhishletNames()
- Confirm phishlet files are present and loaded at startup
- Avoid hardcoding site names; use config-driven values
When it happens
Trigger: Calling cfg.GetPhishlet(site) with a name not loaded in c.phishlets - typo, unloaded phishlet file, or phishlet deleted.
Common situations: Requesting a phishlet by hostname-derived name that was never loaded; phishlet files removed or renamed in the phishlets directory; typo in site name passed from CLI or config; using a child phishlet name before it's created.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- phishlet '%s' can't be deleted - you can only delete child p
- lure for path '%s' not found
- index out of bounds: %d
- auth_tokens: 'search' not found for body auth token
- auth_tokens: 'domain' not found for http auth token
AI-assisted analysis of kgretzky/evilginx2@4c0988a1d9 (2026-09-05).
Data as JSON: /api/errors/26ac9f37443b2a2e.
Report an issue: GitHub.