This is a simple keylogger project built with Python using the pynput library for listening to keyboard events. The keylogger captures keypresses, key releases, and key holds, saving the events to both a plain text file and a JSON file for structured logging.
- Key Capture: Logs pressed, held, and released keys.
- Text Log: Captures the keypresses in a sequential manner and saves them to
keylogger.txt. - JSON Log: Logs key events in a structured format to
key_log.json. - GUI: Simple interface using
tkinterto start and stop the keylogger.
- Python: Programming language.
- pynput: For detecting keyboard input.
- tkinter: For the GUI interface.
- JSON: For structured logging of key events.
-
Clone the repository:
git clone https://github.com/SAMEEHA17/PYTHON_KEYLOGGER.git
-
Install dependencies:
pip install pynput
-
Run the Python script:
python keylogger.py
- Start the Keylogger: The user can start the keylogger by clicking the "Start" button on the GUI.
- Key Logging: The keylogger records the keys pressed, held, and released, and saves the data in both
keylogger.txtandkey_log.json. - Stop the Keylogger: The keylogger can be stopped by clicking the "Stop" button.
keylogger.txt: Contains the raw sequence of key events.key_log.json: A structured JSON file storing pressed, held, and released key events.
This keylogger is for educational purposes only. Please use it responsibly and make sure to obtain proper consent before recording any keystrokes.