Reputation: 1
I'm trying to make a simple keylogger using Python2.7 and am getting a SyntaxError for this piece of code:
def OnKeyboardEvent(event):
logging.basicConfig(filename=file_log, level=logging.DEBUG, format='%(message)s'
chr(event.Ascii)
logging.log(10,chr(event.Ascii))
return True
Once I type this it says invalid Syntax and highlights the chr
next to `(event.Ascii)
If you can answer this THANK YOU!
(PS in the preview the code was set up line by line correctly)
Upvotes: -1
Views: 238
Reputation: 808
def OnKeyboardEvent(event):
logging.basicConfig(filename=file_log, level=logging.DEBUG, format='%(message)s') # missing )
chr(event.Ascii)
Upvotes: 1