A Python-based GUI Keylogger built with CustomTkinter, Pynput, and Pillow, capable of capturing keyboard inputs, screenshots, clipboard data, and system information β all managed via a beautiful graphical interface.
This project demonstrates how real-time keylogging, screenshot capturing, and automated reporting can be implemented securely using Python. It provides:
- An interactive GUI to control all operations.
- Automatic logging of keyboard activity and clipboard data.
- Screenshot capture at some defined intervals.
- Optional email delivery of all collected logs.
- Captures every keystroke pressed on the keyboard.
- Logs include letters, numbers, function keys, and special keys (
Enter,Backspace, etc.). - Stored safely in:
app/data/key_log.txt
- Periodically reads clipboard data (text).
- Stores the last copied text content into:
app/data/clipboard.txt
- Takes full-screen screenshots at regular intervals using
Pillow (PIL). - The image is timestamped and saved automatically.
- All screenshots are stored as PNGs in:
app/data/screenshots/
- Gathers important device details such as:
- OS name and version
- Hostname
- Processor type
- IP address
- Saved in:
app/data/systeminfo.txt
- Periodically sends collected logs and screenshots as ZIP file via email.
- Credentials and recipient are securely managed via
.envfile.
π¦ GKeylogger-5155
βββ app/
β βββ data/
β β βββ key_log.txt
β β βββ clipboard.txt
β β βββ systeminfo.txt
β β βββ screenshots/
β β βββ *.png
β βββ .gitignore
β βββ guikeylogger.py
β βββ requirements.txt
βββ config.json
βββ package.json
βββ README.md
The config.json file lets you customize paths, intervals, email, and GUI settings β no code changes needed.
"paths": {
"data_dir": "data",
"keys_file": "data/key_log.txt",
"system_file": "data/systeminfo.txt",
"clipboard_file": "data/clipboard.txt",
"screenshot_dir": "data/screenshots"
},
"intervals_seconds": {
"screenshot_interval": 900,
"email_interval": 900,
"clipboard_interval": 30
},
"screenshots": { "keep_latest": 10 },
"email": {
"smtp_host": "smtp.gmail.com",
"smtp_port": 587,
"from_env": true
},
"gui": { "icon": "cracking.ico", "image": "cracking.png", "window_title": "Key Logger 5155" },
"safety": { "require_confirm": true }
}
| Section | Key | Default | Description |
|---|---|---|---|
| paths | data_dir |
data |
Directory for storing logs. |
keys_file |
data/key_log.txt |
Keystroke log file. | |
clipboard_file |
data/clipboard.txt |
Clipboard data file. | |
screenshot_dir |
data/screenshots |
Folder for screenshots. | |
| intervals_seconds | screenshot_interval |
900 |
Take screenshot every 15 mins. |
email_interval |
900 |
Send logs via email every 15 mins. | |
clipboard_interval |
30 |
Capture clipboard every 30s. | |
| screenshots | keep_latest |
10 |
Keep only latest screenshots. |
smtp_host |
smtp.gmail.com |
Mail server for sending logs. | |
from_env |
true |
Load credentials from.env. |
|
| gui | window_title |
Key Logger 5155 |
GUI window title. |
- Modify these values to change log intervals, file paths, or email setup without touching the source code.
- Python 3.9+
- CustomTkinter
- Pynput
- Pillow (PIL)
- Pyperclip
- smtplib (built-in)
- python-dotenv 1.0+
git clone https://github.com/<your-username>/Keylogger5155.git
cd Keylogger5155/apppython -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # Linux/Macpip install -r requirements.txtCreate a .env file:
[email protected]
pass=passwordpython guikeylogger.pyπ data/
βββ key_log.txt
β [2025-11-01 08:30:12] Key pressed: A
β [2025-11-01 08:30:13] Key pressed: B
βββ clipboard.txt
β Copied Text: "Hello World"
βββ screenshots/
β screenshot_2025-11-01_08-31-00.png
βββ systeminfo.txt
β OS: Windows 10
β Hostname: user-PC
β Processor: Intel Core i5
β IP: 192.xxx.x.5
- Fork the repo
- Create a feature branch
git checkout -b feature-name
- Commit changes
git commit -m "Added new feature" - Push and create a Pull Request
This project is part of Opcode, IIIT Bhagalpur. Maintainers will review PRs, suggest changes, and merge contributions. Use Issues to report bugs or suggest features.