{"record":{"id":"26ac9f37443b2a2e","repo":"kgretzky/evilginx2","slug":"phishlet-s-not-found","errorCode":null,"errorMessage":"phishlet '%s' not found","messagePattern":"phishlet '(.+?)' not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/config.go","lineNumber":760,"sourceCode":"\tfor _, l := range c.lures {\n\t\tif l.Phishlet == site {\n\t\t\tpl, err := c.GetPhishlet(site)\n\t\t\tif err == nil {\n\t\t\t\tif host == l.Hostname || host == pl.GetLandingPhishHost() {\n\t\t\t\t\tif l.Path == path {\n\t\t\t\t\t\treturn l, nil\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn nil, fmt.Errorf(\"lure for path '%s' not found\", path)\n}\n\nfunc (c *Config) GetPhishlet(site string) (*Phishlet, error) {\n\tpl, ok := c.phishlets[site]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"phishlet '%s' not found\", site)\n\t}\n\treturn pl, nil\n}\n\nfunc (c *Config) GetPhishletNames() []string {\n\treturn c.phishletNames\n}\n\nfunc (c *Config) GetSiteDomain(site string) (string, bool) {\n\tif o, ok := c.phishletConfig[site]; ok {\n\t\treturn o.Hostname, ok\n\t}\n\treturn \"\", false\n}\n\nfunc (c *Config) GetSiteUnauthUrl(site string) (string, bool) {\n\tif o, ok := c.phishletConfig[site]; ok {\n\t\treturn o.UnauthUrl, ok","sourceCodeStart":742,"sourceCodeEnd":778,"githubUrl":"https://github.com/kgretzky/evilginx2/blob/4c0988a1d9db4d172a185e979a38bfd0efdb5830/core/config.go#L742-L778","documentation":"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.","triggerScenarios":"Calling cfg.GetPhishlet(site) with a name not loaded in c.phishlets - typo, unloaded phishlet file, or phishlet deleted.","commonSituations":"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.","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"],"exampleFix":"// before\npl, err := cfg.GetPhishlet(siteName)\n// after\nif !containsString(siteName, cfg.GetPhishletNames()) {\n    return fmt.Errorf(\"phishlet %s is not loaded\", siteName)\n}\npl, err := cfg.GetPhishlet(siteName)","handlingStrategy":"type-guard","validationCode":"func phishletExists(cfg *core.Config, site string) bool {\n    for _, n := range cfg.GetPhishletNames() {\n        if n == site { return true }\n    }\n    return false\n}","typeGuard":null,"tryCatchPattern":"pl, err := cfg.GetPhishlet(site)\nif err != nil {\n    return fmt.Errorf(\"phishlet %q not loaded: %w\", site, err)\n}","preventionTips":["Validate site names against GetPhishletNames()","Confirm phishlet files are present and loaded at startup","Avoid hardcoding site names; use config-driven values"],"tags":["config","phishlet","not-found","go"],"backgroundTag":"resource-not-found","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"}