A simple keylogger written in Python that works on Linux (using evdev) and Windows (using pynput). It logs all keystrokes in plain text to a file and can auto-run on boot in Linux.
keylogger/
├── .gitignore
├── keylogger.py # Cross-platform logger script
├── keylogger.service # systemd service for Linux
├── install.sh # Linux installer
├── uninstall.sh # Linux uninstaller
├── install.bat # Windows installer
├── uninstall.bat # Windows uninstaller
├── requirements.txt # Required Python packages
└── README.md # This file
- ✅ Logs alphanumeric keys and common symbols
- ✅ Supports both Linux and Windows
- ✅ Auto-starts at boot via systemd (Linux)
- ✅ Logs saved as plain text (
keylog.txt)
- Change device path in
keylogger.pyif needed (/dev/input/event3) - Run the installer:
sudo ./install.sh- Logs will be saved to:
~/keylog.txt
✅ Automatically runs on system boot via
systemd.
- Install dependencies:
install.bat- Logs will be saved to:
C:\Users\<YourName>\keylog.txt
sudo ./uninstall.shuninstall.bat- Log file: Defaults to
~/keylog.txt(Linux) or%USERPROFILE%\keylog.txt(Windows) - Keyboard device: Edit
DEVICE = '/dev/input/event3'inkeylogger.pyif needed (Linux only)
This software is for educational and ethical research on devices you own.
Unauthorized use may violate privacy laws and is strictly not recommended.