An educational cybersecurity project , A key logger which records all the keys written or clicked by a user and works in background.
This project is created strictly for educational and research purposes. Its purpose is to demonstrate my programming skills, security understanding, and practical learning in the field of cybersecurity.
- Do NOT use this software for any unauthorized activity.
- Do NOT deploy it on any device, system, or network without explicit written permission from the owner.
- Unauthorized keylogging is illegal, violates privacy laws, and can result in serious criminal penalties.
- The author is not responsible for any misuse, damage, or legal consequences caused by third-party use of this code.
By using or downloading this project, you agree that it is your responsibility to comply with all applicable laws and obtain proper authorization.
Keylogger/
│
├── main.py # Main keylogger script
├── requirements.txt # Python dependencies
├── README.md # Project documentation
├── .gitignore
│
└── logs/ # Folder where key logs are stored
├── log_files_id_info.txt # Info about each keylogger session
└── 2025-11-22_18-40_Keylogger_data.txt # Key log file
- Uses the
pynputlibrary to listen for all keyboard inputs. - Each key press is logged into a file inside the
logs/folder. - Special keys like
Enter,Space, andBackspaceare handled properly. - A separate info file (
log_files_id_info.txt) records the start and end time of each session. - Filenames are timestamped to ensure uniqueness and cross-platform safety.
These steps work on Windows, macOS, and Linux:
git clone https://github.com/Balaj-dev/KeyLogger.git
cd KeyLoggerpip install -r requirements.txtpython main.pyIf your system uses python3, use:
python3 main.pymacOS users: Go to System Settings → Privacy & Security → Input Monitoring and allow Python/Terminal to capture keyboard input.
All logs are saved inside the logs/ folder:
logs/
│── log_files_id_info.txt # Info about start/end of sessions
└── 2025-11-22_18-40_Keylogger_data.txt # Key presses for this session
This project is intended for educational purposes only. Do not use it to capture keystrokes from others without explicit permission, as it may be illegal in your jurisdiction.