2024-12-22 07:09:54 +00:00
markdown
2024-12-25 23:48:47 +00:00
# Keyboard Input Event Logger Summary
2024-12-22 07:06:49 +00:00
2024-12-25 22:31:46 +00:00
## Overview
2024-12-22 07:06:49 +00:00
2024-12-25 23:48:47 +00:00
This C program captures keyboard input events, resolves device names, and logs these events into a specified SQLite database `tikker.db` . It utilizes a custom library `sormc.h` for database management.
2024-12-22 07:06:49 +00:00
2024-12-25 23:48:47 +00:00
## Features
2024-12-22 07:06:49 +00:00
2024-12-25 23:48:47 +00:00
- **Key Event Mapping**: Maps keycodes to their respective characters for better representation.
- **Event Logging**: Logs key events with timestamps efficiently into the database.
- **User Configuration**: Allows device selection via a command-line option for targeted event capturing.
- **MIT License**: Allows free use, modification, and distribution of the software.
2024-12-22 07:06:49 +00:00
2024-12-25 23:48:47 +00:00
## Bugs and Issues
2024-12-22 07:06:49 +00:00
2024-12-25 23:48:47 +00:00
1. **Undefined Functions** : Missing definitions for `rargs_get_option_string` , `sormc` , and `sormq` , leading to potential undefined behavior.
2. **Device Resolution** : Uses `O_RDONLY` to open devices, which may need root access, potentially causing permission issues.
3. **Array Boundaries** : Access to `keycode_to_char` without bounds checking could lead to undefined behavior.
4. **Error Handling** : Lack of checks after using `snprintf` , `open` , and `ioctl` , leading to potential failures and bugs.
2024-12-22 07:06:49 +00:00
2024-12-25 23:48:47 +00:00
## Recommendations
2024-12-22 07:06:49 +00:00
2024-12-25 23:48:47 +00:00
- **Argument Parsing**: Use robust libraries for better flexibility and error management.
- **Signal Handling**: Implement graceful termination with proper file descriptor management.
- **Error Checking**: Add checks post `snprintf` , `open` , and `ioctl` to handle errors effectively.
- **Optimize Performance**: Reduce redundancy in `printf` statements for better efficiency.
2024-12-25 22:31:46 +00:00
2024-12-25 23:48:47 +00:00
## Positive Attributes
2024-12-25 22:31:46 +00:00
2024-12-25 23:48:47 +00:00
- Effectively maps keycodes to characters.
- Provides informative console output for ongoing events.
- Efficient database logging of key events.
## Potential Improvements
To enhance its robustness and user-friendliness, the program needs the implementation of missing functions and improved error-handling mechanisms.
## Alternative Open Source Tools
- **logkeys**: A Linux keylogger similar in function.
- **Keylogger (Python)**: Uses `pynput` for cross-platform keylogging.
- **Linux-dirty-injector**: Provides additional functionalities including keylogging.
---
*Note: The program is reviewed with a grade of 6.0, suggesting more development is needed in error handling and functionality completion.*