{"record":{"id":"ae0e0e9e73211cf3","repo":"kgretzky/evilginx2","slug":"edit-v","errorCode":null,"errorMessage":"edit: %v","messagePattern":"edit: %v","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/terminal.go","lineNumber":879,"sourceCode":"\t\t\t\t}\n\t\t\t\tl, err := t.cfg.GetLure(l_id)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"pause: %v\", err)\n\t\t\t\t}\n\t\t\t\ts_duration := args[2]\n\n\t\t\t\tt_dur, err := ParseDurationString(s_duration)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"pause: %v\", err)\n\t\t\t\t}\n\t\t\t\tt_now := time.Now()\n\t\t\t\tlog.Info(\"current time: %s\", t_now.Format(\"2006-01-02 15:04:05\"))\n\t\t\t\tlog.Info(\"unpauses at:  %s\", t_now.Add(t_dur).Format(\"2006-01-02 15:04:05\"))\n\n\t\t\t\tl.PausedUntil = t_now.Add(t_dur).Unix()\n\t\t\t\terr = t.cfg.SetLure(l_id, l)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"edit: %v\", err)\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t}\n\t\tcase \"unpause\":\n\t\t\tif pn == 2 {\n\t\t\t\tl_id, err := strconv.Atoi(strings.TrimSpace(args[1]))\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"pause: %v\", err)\n\t\t\t\t}\n\t\t\t\tl, err := t.cfg.GetLure(l_id)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"pause: %v\", err)\n\t\t\t\t}\n\n\t\t\t\tlog.Info(\"lure for phishlet '%s' unpaused\", l.Phishlet)\n\n\t\t\t\tl.PausedUntil = 0\n\t\t\t\terr = t.cfg.SetLure(l_id, l)","sourceCodeStart":861,"sourceCodeEnd":897,"githubUrl":"https://github.com/kgretzky/evilginx2/blob/4c0988a1d9db4d172a185e979a38bfd0efdb5830/core/terminal.go#L861-L897","documentation":"Thrown by the `lures edit <id> pause <duration>` command handler in handleLures when updating the lure's PausedUntil timestamp via cfg.SetLure fails. The underlying persistence error (file write/serialization failure) is wrapped with the 'edit:' prefix. It means the pause was applied in memory but could not be saved to the lure configuration file.","triggerScenarios":"`lures edit <id> pause <dur>` when SetLure returns an error: config file unreadable, lures.yaml corrupted, disk full, or the lure was deleted concurrently between GetLure and SetLure.","commonSituations":"Running evilginx3 with a read-only config directory, permission changed on ~/.evilginx or the lures file, or an operator deleting the lure from another session while pausing it.","solutions":["Check filesystem permissions on the config directory and lures file (must be writable by the process)","Verify the lure id still exists with `lures get` before editing","Check disk space with df -h","Inspect the wrapped inner error (%v) for the exact persistence failure cause"],"exampleFix":"// before\nerr = t.cfg.SetLure(l_id, l)\nif err != nil {\n\treturn fmt.Errorf(\"edit: %v\", err)\n}\n// after\nerr = t.cfg.SetLure(l_id, l)\nif err != nil {\n\treturn fmt.Errorf(\"edit lure %d: failed to persist pause: %w\", l_id, err)\n}","handlingStrategy":"try-catch","validationCode":"if _, err := os.Stat(cfgPath); err != nil || !writable(cfgPath) { /* abort before edit */ }","typeGuard":"func lureExists(id int) bool { _, err := cfg.GetLure(id); return err == nil }","tryCatchPattern":"err := t.cfg.SetLure(l_id, l)\nif err != nil {\n\treturn fmt.Errorf(\"edit: persist pause failed: %w\", err)\n}","preventionTips":["Ensure the evilginx config directory is writable by the running user","Monitor disk space on the host","Run `lures get` to confirm the id exists before mutating it"],"tags":["go","cli","persistence"],"backgroundTag":"config-write-failed","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"}