A keylogger written in python using pyHook and pyWin32 modules.
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.
- Python (2.7.13, 32 bit)
- PyHook https://sourceforge.net/projects/pyhook/
- PyWin32 https://sourceforge.net/projects/pywin32/
- Requests http://docs.python-requests.org/
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.
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
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.
- Sreenath Sivadas - Initial work - sreesdas
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details