This Python script implements a basic keylogger that records keystrokes and saves them to a file named 'keystrokes.txt'. It uses the pynput library to monitor keyboard events and writes each keystroke (including special keys) to the log file. Before starting, the program asks for user consent to ensure ethical use.
The feature of this Python script are that it logs keystrokes to a specified file, ensuring user consent before starting. To use, run the script, agree to logging, and press 'Esc' to stop.
Usage instructions:
To use this keylogger script, first ensure you have the necessary dependencies installed by running pip install pynput in your terminal. Next, execute the script by running python keylogger.py in your terminal. Upon execution, you will be prompted to confirm consent for logging keystrokes. Press the 'Esc' key at any time to stop logging. This tool is designed for educational purposes and should be used responsibly and with proper permissions.
Disclaimer:
This tool is intended for educational purposes only. Ensure you have proper permissions before using it.