Repository navigation
Version: v5.0
- Date: 2025-06-30
🛑 Emergency Shutdown & Backup System (Major Upgrade)
🚨 Emergency Shutdown (ESC Key Triggered)
- Introduced a powerful emergency termination mechanism that allows users to instantly shut down the monitoring process by pressing the ESC key.
- On activation, the system performs multiple critical actions in sequence:
- Final keylog flush: Immediately writes any buffered keystrokes to file.
- Screenshot capture: Takes a snapshot of the current screen.
- Clipboard capture: Retrieves and logs the most recent clipboard contents.
- Timestamped session closure: Logs total session time and marks shutdown as "EMERGENCY".
- Terminates all active threads (like the hourly scheduler) safely to prevent lingering background processes.
📧 Emergency Email Dispatch System
- Sends an urgent email containing all collected logs (keylog, system info, clipboard, screenshot) as attachments.
- Designed to work even under unstable network conditions with reduced timeout and retry logic.
- Prioritizes Gmail SMTP with fallback to Outlook/Yahoo.
- Ensures email only sends once by tracking
_email_sentstate to avoid duplicates.
💾 Robust Local Backup System
- Even if internet/email fails, the program now creates timestamped backups of all data in a
backups/folder. - Ensures data safety and post-mortem availability.
- Includes detailed error logging and backup status reporting to console.
🧹 Cleanup Enhancements
- A new
cleanup_on_exitfunction ensures that even normal shutdowns (e.g., Ctrl+C or process kill) will trigger final email report and backup. - Reduces data loss risk during unplanned shutdowns.
✅ Final Result:
This version ensures that no monitoring session ends without data being saved or sent — making the system significantly more reliable, resilient, and secure.