Skip to content

A key-logger written in python using pyHook and pyWin32 modules.

License

Notifications You must be signed in to change notification settings

sreesdas/python-keylogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-keylogger

A keylogger written in python using pyHook and pyWin32 modules.

Getting Started

Download the zip or Clone the repo to start working with this project.

This keylogger has 2 variants (online and offline). The offline version can be found inside the archive folder, which simply outputs the keystrokes into a text file. Whereas the online variant, makes POST requests to a remote server which stores the input data.

If you have any feedback or run into issues, please file an issue on this repository.

Prerequisites

Installing

After installing Python, add C:\Python27 and C:\Python27\Scripts to the Path env variable Download and Install pyHook and pyWin32 from the links provided

Requests can be installed from pip

$ pip install requests
  • For the online variant, you can either start a free web hosting account with Hostinger or 000WebHost.

  • You can also use xampp or wamp to test it out in your local machine.

  • After setting up your server, copy the contents of server_side_scripts folder to C:\xampp\htdocs in your PC or the public_html folder in your hosting website.

  • Note that you can ignore these steps if your are using the offline version

Once everything is set, run the keylogger.py file

Now all your keystrokes will be logged into a file on the server. You can view it from the link http://your_server_name/logger/view.php

The back quote key acts as a kill switch to the program, which on presing two times, terminate the program execution.

Compiling the python into an executable

For practical purposes, its always necessary to convert the .py scripts into .exe files. There are a dozen tools available for this conversion.( also called freezing )

But I will be using pyinstaller here because it's easy to use plus it builds smaller executables.

$ pip install pyinstaller
$ cd /folder/containing/your/py/script
$ pyinstaller keylogger.py --onefile

It compiles a single .exe file which will be inside the dist folder

Compatability with Linux

Since we are using Windows specific libraries for hooking the keystrokes, this won't work with linux. But same code can be reused for other operating systems with minor modifications.

Authors

  • Sreenath Sivadas - Initial work - sreesdas

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

A key-logger written in python using pyHook and pyWin32 modules.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published