This python script, when ran, will log keystrokes into a file called log.txt. The keystrokes will be captured whenever a key is pressed (not just when typing into the terminal).
For the script to work, you will need a virtual environment running with the dependency pynput
installed.
run python3 ./keylogger.pyw
and watch the magic happen.