Skip to content

An educational cybersecurity project , A key logger which records all the keys written or clicked by a user and works in background.

License

Notifications You must be signed in to change notification settings

Balaj-dev/KeyLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KeyLogger

An educational cybersecurity project , A key logger which records all the keys written or clicked by a user and works in background.

Disclaimer

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.


📂 Project File Structure


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

⚙ How It Works

  • Uses the pynput library to listen for all keyboard inputs.
  • Each key press is logged into a file inside the logs/ folder.
  • Special keys like Enter, Space, and Backspace are 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.

💻 Installation & Usage

These steps work on Windows, macOS, and Linux:

1. Clone the repository

git clone https://github.com/Balaj-dev/KeyLogger.git
cd KeyLogger

2. Install dependencies

pip install -r requirements.txt

3. Run the keylogger

python main.py

If your system uses python3, use:

python3 main.py

macOS users: Go to System Settings → Privacy & Security → Input Monitoring and allow Python/Terminal to capture keyboard input.


📁 Output

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

⚠ Legal Notice

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.

About

An educational cybersecurity project , A key logger which records all the keys written or clicked by a user and works in background.

Topics

Resources

License

Stars

Watchers

Forks

Languages