{"id":19225157,"url":"https://github.com/rafali25/keylogger","last_synced_at":"2025-06-15T06:33:07.705Z","repository":{"id":261827176,"uuid":"885462810","full_name":"rafali25/keylogger","owner":"rafali25","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-14T02:37:20.000Z","size":329,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-26T22:04:42.135Z","etag":null,"topics":["cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","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/rafali25.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,"zenodo":null}},"created_at":"2024-11-08T16:23:30.000Z","updated_at":"2024-11-14T02:37:23.000Z","dependencies_parsed_at":"2025-05-26T22:04:45.934Z","dependency_job_id":"ce0996c9-2e64-4c2d-bde5-12a00b96f215","html_url":"https://github.com/rafali25/keylogger","commit_stats":null,"previous_names":["rafali25/keylogger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rafali25/keylogger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafali25%2Fkeylogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafali25%2Fkeylogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafali25%2Fkeylogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafali25%2Fkeylogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafali25","download_url":"https://codeload.github.com/rafali25/keylogger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafali25%2Fkeylogger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259934646,"owners_count":22934329,"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":["cpp"],"created_at":"2024-11-09T15:14:08.608Z","updated_at":"2025-06-15T06:33:07.662Z","avatar_url":"https://github.com/rafali25.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keylogger\n\nThis **Keylogger** program runs in the background and logs all keyboard inputs and certain mouse clicks to a `log.txt` file. The file is saved in the same directory as the `main.exe` executable.\n\n\u003e **Disclaimer**: This project is intended for educational and ethical testing purposes only. Unauthorized use of keyloggers on others' devices is illegal and unethical.\n\n## Project Structure\n- **main.cpp**: The primary source code file that contains the keylogging functionality. It listens to keyboard and mouse inputs and logs them to `log.txt`.\n\n## Features\n- **Logs Keyboard Input**: Captures and records all keyboard presses, including special keys (e.g., Backspace, Enter, Shift).\n- **Captures Mouse Clicks**: Logs left-clicks, right-clicks, and mouse scroll actions.\n- **Runs in Background**: Uses `FreeConsole()` to hide the console window, allowing the program to run without any visible interface.\n- **Saves Logs**: Appends all inputs to a `log.txt` file located in the same directory as the executable (`main.exe`).\n\n## How It Works\nThe `main.cpp` code includes a function `save(int _key, char *file)` that logs each keypress to a specified file. In `main()`, a loop continuously checks for key presses and saves them to `log.txt` when detected.\n\n### Key Logging\nDifferent key events are mapped to human-readable strings. For example:\n- `VK_BACK` is logged as `[bckspc]`\n- `VK_RETURN` is logged as `[enter]`\n- `VK_LBUTTON` (left mouse click) is logged as `[Lclick]`\n\nThe program captures other keys and special keys in a similar format.\n\n### Background Execution\nAfter launching, the program hides the console window using `FreeConsole()`. This allows it to run in the background without user interference.\n\n## How to Build and Run\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/rafali25/keylogger/tree/main\n   cd Keylogger\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafali25%2Fkeylogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafali25%2Fkeylogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafali25%2Fkeylogger/lists"}