This is a simple Python-based keystroke logger that records every key press on the keyboard and saves it to a text file named keystrokes.txt.
Before running the script, ensure that you have Python installed on your system. You'll also need to install the keyboard module, which can be done using pip.
-
Install Python: If you don't already have Python installed, download and install it from Python's official website.
-
Install the
keyboardModule: Open a terminal or command prompt and run the following command:pip install keyboard
- Logging Keystrokes: The script listens for key presses and writes each one to a file named
keystrokes.txtin the same directory where the script is executed.
-
Save the script to a file, for example,
keystroke_logger.py. -
Navigate to the directory containing the script.
-
Run the script using Python:
python keystroke_logger.py
-
The script will start logging keystrokes and save them to
keystrokes.txt. -
Stopping the Script: To stop the script, you can manually interrupt it in the terminal by pressing
Ctrl + C.
This script is intended for educational purposes only. Unauthorized use of keyloggers or similar software to capture someone else's keystrokes without their consent is illegal and unethical.
This project is licensed under the MIT License - see the LICENSE file for details.
This README provides an overview of how to use your keystroke logger script while highlighting the importance of ethical use.