This is a simple keylogger script implemented in Python 3 using the pynput library. It logs keypresses and stores them in a text file for later analysis.
Before running the script, make sure you have Python 3.x installed on your system. You also need to install the pynput library. You can do this via pip:
To run the keylogger, follow these steps:
- Install the pynput library if you haven’t already (see Prerequisites above).
- Clone or download this repository to your local machine.
- Navigate to the directory containing the
Keylogger.py
file. - Open a terminal or command prompt in that directory.
- Run the script using the following command:
pip install pynput
python Keylogger.py
The keylogger listens for keyboard events using the pynput library. Each keypress is recorded and stored in a text file named log.txt
in the same directory as the script.
To stop the keylogger, you can terminate the script manually by pressing Ctrl+C
in the terminal or command prompt where it’s running.
This script is provided for educational purposes only. Do not use it for any malicious purposes. Monitoring or recording someone’s keystrokes without their consent may violate privacy laws in your jurisdiction.
Leave a Reply