This is a simple keylogger which logs the keystrokes by user till the program is running.
Mostly used language is Python but initialization can be done only with shell script.
I'll upload one more simple keylogger but it's main disadvantage is the output file can't be deleted as the output file is not being closed by program.
Before using this keylogger, you need to modify the program with various data which I'll be explaining later.
- If you're using Linux destro (Kali Linux, Ubuntu, Parrot etc), you just need to clone this repo using
git clone https://github.com/nitinkumar30/keylogger
- If you're using Windows OS, you need to run it inside VS Code (I've tried in VS Code).
- For Linux OS
- Open terminal in sudo mode and type
git clone https://github.com/nitinkumar30/keylogger
- It'll create a local directory of it. Now type
You'll see the directory
ls
keylogger. - Type
cd keylogger - Now again type
to see all files with their file permissions
ls -l
- Now type
to give executable permission to shell/bash file
chmod +x setup.sh
- Now type
[ btw, my code will install required libraries automatically but just to make sure everything works fine]
pip3 install -r requirements.txt
- Now run the script as
; OPTION is the options chosen by user how he need the output file generated of the log file. There are 2 options: file & email
./setup.sh OPTION
- The output file will be generated and filename will be in format
keylog_starttime_endtime. - In case you need to mail the output, you need to do some changes in code as well as Google Account itself. For more info, kindly visit Google Account customisation and File changes to be done below.
- To stop the program simply type
in terminal.CTRL + C
- Open terminal in sudo mode and type
- For Windows OS
- Extract the downloaded repo and open the folder in Visual Studio Code.
- Follow this process or go up to Tools used to run
- Change the file keylogger.py as per the instructions.
- Run the file setup.sh using the code
; OPTION is the options chosen by user how he need the output file generated of the log file. There are 2 options: file & email
./setup.sh OPTION
- File will run and the output file will be mailed or saved in local directory as per the above files.
- In the end, you need to stop the program. To do so, simple type
in terminal.
CTRL + C
- The very first thing you need to do is customise your google gmail account.
- Visit here and check IMAP is turned ON.
- Now try to run code. If you're getting an error related to OAuth or authentication, you need to provide App Password. So, go to next step.
- Turn ON less secured apps by navigating here
- Now, create a new App Password by navigating here
- Copy the 16-character code in yellow bar and paste in keylogger.py
- Now, run the code.!
- Firstly you need to pass your gmail id in 9th line inside keylogger.py. Following is the code:
EMAIL_ADDRESS = "yourgmailid@gmail.com"
- Now, you need to pass your google account password(of course you need to give and it can't be hacked as it's in your local file) in next line.
EMAIL_PASSWORD = "yourgmailpass@123"
- If google account password doesn't work, delete the google account password and put App Password(that 16 digit code you got) in the same place.
EMAIL_PASSWORD = "abcdefghijklmnop"
Kindly don't use this to harm anyone or perform any unethical activities. I strongly support ethical hacking and my intension is just to let my fellow githubers know how to make a simple keylogger.
Also this repo is PUBLIC and you may use the code for free but make sure to give me due credits for my work, dedication and whole weekend.