kgretzky/evilginx2 · error
id %d not found
Error message
id %d not found
What it means
handleSessions looks up a live session by numeric ID; when no active session with that ID exists in the session list, it returns 'id %d not found'. Session IDs are ephemeral — they are reassigned and vanish when sessions expire or the server restarts.
Source
Thrown at core/terminal.go:493
}
for k, v := range s.HttpTokens {
tkeys = append(tkeys, k)
tvals = append(tvals, white.Sprint(v))
}
log.Printf("[ %s ]\n%s\n", lgreen.Sprint("tokens"), AsRows(tkeys, tvals))
}
if len(s.CookieTokens) > 0 {
json_tokens := t.cookieTokensToJSON(s.CookieTokens)
log.Printf("[ %s ]\n%s\n\n", lyellow.Sprint("cookies"), json_tokens)
log.Printf("%s %s %s %s%s\n\n", dgray.Sprint("(use"), cyan.Sprint("StorageAce"), dgray.Sprint("extension to import the cookies:"), white.Sprint("https://chromewebstore.google.com/detail/storageace/cpbgcbmddckpmhfbdckeolkkhkjjmplo"), dgray.Sprint(")"))
}
}
break
}
}
if !s_found {
return fmt.Errorf("id %d not found", id)
}
return nil
} else if pn == 2 {
switch args[0] {
case "delete":
if args[1] == "all" {
sessions, err := t.db.ListSessions()
if err != nil {
return err
}
if len(sessions) == 0 {
break
}
for _, s := range sessions {
err = t.db.DeleteSessionById(s.Id)
if err != nil {
log.Warning("delete: %v", err)
} else {View on GitHub (pinned to 4c0988a1d9)
Solutions
- Run 'sessions' with no args to list current IDs and pick a valid one
- Confirm the target victim actually visited and has an active session
- Re-check after server restart — all old IDs are gone
- Use 'sessions delete all' if the intent is cleanup rather than a specific ID
Example fix
// before sessions 17 // after sessions # list active IDs first sessions 3
Defensive patterns
Strategy: validation
Validate before calling
ids := listActiveSessionIDs() // from bare 'sessions' output
if !contains(ids, wantID) {
return fmt.Errorf("session %d is not active; pick from %v", wantID, ids)
} Try / catch
if err := t.handleSessions([]string{strconv.Itoa(id)}); err != nil {
if strings.Contains(err.Error(), "not found") {
t.handleSessions(nil) // list current IDs
}
} Prevention
- Always list sessions ('sessions') immediately before acting on an ID
- Treat IDs as ephemeral: re-lookup after any restart or timeout
- Parse IDs from live output, never from saved notes or logs
When it happens
Trigger: Running 'sessions <id>' to view or a pn>=2 form like 'sessions delete <id>' where the ID was never created or has already been closed/expired (s_found stays false).
Common situations: Using a session ID captured hours earlier after a restart; typo in the ID; targeting a session that expired by timeout; reusing IDs from a previous run's notes.
Related errors
- command not found
- invalid syntax: %s
- please disable the proxy before making changes to its config
- set custom parameters for the child phishlet using format 'p
- incorrect number of arguments
AI-assisted analysis of kgretzky/evilginx2@4c0988a1d9 (2026-09-05).
Data as JSON: /api/errors/c397c64be7a57a11.
Report an issue: GitHub.