{"id":24852053,"url":"https://github.com/abdulbasit110/key-logger","last_synced_at":"2025-10-13T00:49:06.199Z","repository":{"id":272474206,"uuid":"916708726","full_name":"Abdulbasit110/Key-logger","owner":"Abdulbasit110","description":"An educational Python keylogger that captures keystrokes and securely encrypts logs using `pynput` and `cryptography`. For educational use only.","archived":false,"fork":false,"pushed_at":"2025-01-14T17:22:46.000Z","size":161,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T14:38:44.656Z","etag":null,"topics":["cryptography","cybersecurity","encryption","keylogger","pynput"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Abdulbasit110.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-14T16:09:40.000Z","updated_at":"2025-01-14T17:22:50.000Z","dependencies_parsed_at":"2025-01-14T18:17:28.110Z","dependency_job_id":"8dabf917-afae-4446-b0e3-cc6b4e2ce29a","html_url":"https://github.com/Abdulbasit110/Key-logger","commit_stats":null,"previous_names":["abdulbasit110/key-logger"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdulbasit110%2FKey-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdulbasit110%2FKey-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdulbasit110%2FKey-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdulbasit110%2FKey-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abdulbasit110","download_url":"https://codeload.github.com/Abdulbasit110/Key-logger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245659053,"owners_count":20651526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","cybersecurity","encryption","keylogger","pynput"],"created_at":"2025-01-31T14:38:48.565Z","updated_at":"2025-10-13T00:49:01.140Z","avatar_url":"https://github.com/Abdulbasit110.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Keylogger\n\nThis project is a simple keylogger implemented in Python. It captures user keystrokes and stores them in an encrypted log file. The logging process can be terminated by pressing the `Esc` key. Additionally, a decryption function is included to view the logged keystrokes securely.\n\n## Key Logger Flow\n\n![image](https://github.com/user-attachments/assets/91078e4e-413a-4933-8e3c-2297f43fee92)\n\n\n## Features\n\n- **Keystroke Logging:** Records all keystrokes made by the user.\n- **Encryption:** Utilizes the `cryptography` library to encrypt logged keystrokes, ensuring data security.\n- **Decryption Functionality:** Includes a function to decrypt the log file and display the original keystrokes securely.\n- **Termination with Esc Key:** Pressing the `Esc` key stops the keylogger gracefully.\n- **Persistent Encryption Key:** The encryption key is saved in a file (`encryption_key.key`) to ensure data can be decrypted across sessions.\n\n## Prerequisites\n\nEnsure you have the following installed:\n\n- **Python 3.x**\n- **pynput library**: For capturing keyboard input.\n- **cryptography library**: For encrypting and decrypting the logged keystrokes.\n\n## Installation\n\n1. **Clone the Repository:**\n\n   ```bash\n   git clone https://github.com/Abdulbasit110/Key-logger.git\n   cd Key-logger\n   ```\n\n2. **Create a Virtual Environment (Optional but Recommended):**\n\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n   ```\n\n3. **Install Dependencies:**\n\n   ```bash\n   pip install pynput cryptography\n   ```\n\n## Usage\n\n1. **Run the Keylogger:**\n\n   ```bash\n   python main.py\n   ```\n\n2. **Terminate Logging:**\n\n   - Press the `Esc` key to stop the keylogger gracefully.\n\n3. **Access the Log File:**\n\n   - The encrypted log file (`keys.txt`) will be in the same directory.\n\n4. **Decrypt the Log File:**\n\n   - After the keylogger stops, you will be prompted to decrypt the log file.\n   - Select \"yes\" to decrypt and view the original keystrokes.\n   - The encryption key saved in `encryption_key.key` ensures decryption is consistent across sessions.\n\n## Code Overview\n\nThe key components of the keylogger are:\n\n- **Keystroke Capture:** Utilizes the `pynput` library to monitor and record keystrokes.\n- **Encryption:** Employs the `cryptography` library's `Fernet` module to encrypt keystrokes before logging.\n- **Decryption:** Reads the encrypted log file and decrypts its contents using the stored encryption key.\n- **Termination:** Listens for the `Esc` key to stop the keylogger gracefully.\n- **Persistent Encryption Key:** Ensures the encryption key remains consistent, enabling seamless decryption of logs from previous sessions.\n\n## Ethical Considerations\n\nThis keylogger is developed for educational purposes only. Unauthorized use of keyloggers is illegal and unethical. Always obtain explicit consent before deploying this tool on any system.\n\n## Acknowledgments\n\n- [pynput library](https://pypi.org/project/pynput/)\n- [cryptography library](https://cryptography.io/)\n\n## References\n\n- For more insights into creating keyloggers in Python, you can refer to the following resources:\n\n  - [Design a Keylogger in Python - GeeksforGeeks](https://www.geeksforgeeks.org/design-a-keylogger-in-python/)\n  - [Implementing a KeyLogger in Python - AskPython](https://www.askpython.com/python/examples/keylogger-in-python)\n  - [Creating a Keylogger in Python - ByteScrum](https://blog.bytescrum.com/creating-a-keylogger-in-python)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdulbasit110%2Fkey-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdulbasit110%2Fkey-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdulbasit110%2Fkey-logger/lists"}