need help
need help

Reputation: 1

Getting Syntax error with Python

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

Answers (1)

JGerulskis
JGerulskis

Reputation: 808

def OnKeyboardEvent(event):
    logging.basicConfig(filename=file_log, level=logging.DEBUG, format='%(message)s') # missing )
    chr(event.Ascii)

Upvotes: 1

Related Questions