This is a simple Python keylogger designed for ethical and educational purposes only. It logs keystrokes, captures screenshots, records clipboard data, and sends the logs via email.
⚠️ Disclaimer: This project is intended for educational use only. Unauthorized use of this keylogger is illegal and unethical. Always obtain proper authorization before deploying.
- Logs all keystrokes, including special keys.
- Captures screenshots at regular intervals.
- Logs clipboard content.
- Sends logged data via email.
- Runs in the background using multithreading.
- Open the
main.pyfile and configure the email settings for sending the logs.
# Email configuration
EMAIL_ADDRESS = "your_email@example.com" # Your email address
EMAIL_PASSWORD = "your_password" # Your email password (use app-specific passwords if needed)
SEND_TO_EMAIL = "recipient_email@example.com" # Email to receive the logs-
For Windows Users:
python -m venv venv venv\Scripts\activate
-
For Linux Users:
python3 -m venv venv source venv/bin/activate
pip install -r requirements.txtpython3 main.pyThe script will continuously log information and send it to the configured email address.
-
Key Logging:
- Captures all keystrokes and logs them to a file in the current directory.
-
Screenshot Capture:
- Takes a screenshot every 60 seconds and saves it as
screenshot_<timestamp>.png.
- Takes a screenshot every 60 seconds and saves it as
-
Clipboard Logging:
- Monitors and logs changes in clipboard content every 5 seconds.
-
Email Sending:
- Sends the keylog file to the configured email address every hour.
keylog_<timestamp>.txt: A file containing all logged keystrokes and clipboard data.screenshot_<timestamp>.png: Screenshots taken at regular intervals.
-
Use environment variables to store sensitive information like email addresses and passwords. Example using environment variables:
import os EMAIL_ADDRESS = os.getenv('EMAIL_ADDRESS') EMAIL_PASSWORD = os.getenv('EMAIL_PASSWORD')
-
Store your credentials securely using
.envfiles and libraries likepython-dotenv.
- Do not use this keylogger for illegal purposes.
- Use it only for authorized testing and educational purposes.
- Ensure that you have explicit permission before monitoring any system.
We welcome contributions! If you'd like to contribute to this Python script, please check out our Contribution Guidelines.
Please review our Code of Conduct before participating in this project.
This project is licensed under the MIT License. See the LICENSE file for details.
Santosh Bhandari