Cross-platform process monitoring for exam-control scenarios.
The project includes:
- OS-specific whitelist logic for Windows, Linux, and macOS.
- A CLI monitor mode that checks running processes every second and prints blocked-process alerts.
- A timed control mode that can enforce blocking/termination using the existing OS modules.
- Cross-platform support: Windows, Linux, macOS
- Whitelist-based process validation
- Real-time CLI alerts
- Modular OS logic in
Process_OS/
project-root/
├── main.py # Timed monitoring runner (uses OS modules)
├── monitor.py # Alert-only CLI monitor (no terminate)
├── process_detect.py # Simple process list utility by OS
├── Process_OS/
│ ├── windows_process.py # Windows whitelist + process handling
│ ├── linux_process.py # Linux whitelist + process handling
│ └── unix_process.py # macOS whitelist + process handling
├── LICENSE
└── README.md
- Python 3.9+
psutil
Install dependency:
pip install psutilRuns continuously, checks once per second, and prints blocked processes to STDOUT. No process is terminated in this mode.
python monitor.pyOptions:
python monitor.py --interval 1.0 # custom scan interval (seconds)
python monitor.py --once # single scan and exitPrompts for start/end times and runs the OS-specific workflow.
python main.pyNote: OS modules in Process_OS/ currently include termination logic for unauthorized processes when used through timed/enforcement paths.
python process_detect.pyEdit whitelist entries in:
Process_OS/windows_process.pyProcess_OS/linux_process.pyProcess_OS/unix_process.py
Be careful when changing whitelist values. Removing essential system processes can cause instability.
- Some system/orphaned processes may be inaccessible due to permissions.
- Process names vary by OS version and vendor tools, so whitelist tuning may be required per machine.
This project is for educational use and can be adapted for academic purposes.