kgretzky/evilginx2 · warning
get-url: %v
Error message
get-url: %v
What it means
The `lures get-url <id>` command wraps every underlying failure as `get-url: %v`. This instance fires when the lure ID argument is not a valid integer and strconv.Atoi fails, so the lure ID could not be parsed.
Source
Thrown at core/terminal.go:741
if pn == 2 {
_, err := t.cfg.GetPhishlet(args[1])
if err != nil {
return err
}
l := &Lure{
Path: "/" + GenRandomString(8),
Phishlet: args[1],
}
t.cfg.AddLure(args[1], l)
log.Info("created lure with ID: %d", len(t.cfg.lures)-1)
return nil
}
return fmt.Errorf("incorrect number of arguments")
case "get-url":
if pn >= 2 {
l_id, err := strconv.Atoi(strings.TrimSpace(args[1]))
if err != nil {
return fmt.Errorf("get-url: %v", err)
}
l, err := t.cfg.GetLure(l_id)
if err != nil {
return fmt.Errorf("get-url: %v", err)
}
pl, err := t.cfg.GetPhishlet(l.Phishlet)
if err != nil {
return fmt.Errorf("get-url: %v", err)
}
bhost, ok := t.cfg.GetSiteDomain(pl.Name)
if !ok || len(bhost) == 0 {
return fmt.Errorf("no hostname set for phishlet '%s'", pl.Name)
}
var base_url string
if l.Hostname != "" {
base_url = "https://" + l.Hostname + l.Path
} else {View on GitHub (pinned to 4c0988a1d9)
Solutions
- Run `lures` to list lure IDs, then use the numeric ID: `lures get-url 0`
- Trim whitespace/quotes from the ID argument
- Wrap IDs containing special characters in quotes so the shell passes them intact
Example fix
// before lures get-url first // after lures get-url 0
Defensive patterns
Strategy: validation
Validate before calling
func parseLureID(raw string) (int, error) {
id, err := strconv.Atoi(strings.TrimSpace(raw))
if err != nil { return 0, fmt.Errorf("lure id must be an integer, got %q", raw) }
return id, nil
} Type guard
func isNumericLureID(raw string) bool {
_, err := strconv.Atoi(strings.TrimSpace(raw))
return err == nil
} Try / catch
id, err := strconv.Atoi(strings.TrimSpace(arg))
if err != nil {
log.Info("usage: lures get-url <numeric-id>; run 'lures' to list IDs")
return
} Prevention
- Use numeric lure IDs, not names
- Trim whitespace and strip quotes from IDs
- List lures with `lures` to get valid IDs
When it happens
Trigger: `lures get-url <non-numeric>` e.g. `lures get-url abc`, an empty string after trimming, or an ID with stray characters.
Common situations: Passing a lure name or hostname instead of the numeric ID; extra characters from copy-paste; using a 0-based vs 1-based ID assumption that hit a wrong token.
Related errors
- incorrect number of arguments
- command not found
- invalid syntax: %s
- please disable the proxy before making changes to its config
- id %d not found
AI-assisted analysis of kgretzky/evilginx2@4c0988a1d9 (2026-09-05).
Data as JSON: /api/errors/f2244dc152559c06.
Report an issue: GitHub.