This project is a Java-based key sniffing service that logs keystrokes and uploads the log file to a server when the program is forced to stop.
- Key Sniffing: Captures global key events using the JNativeHook library.
- Logging: Logs keystrokes to a file.
- Shutdown Hook: Prints a message and uploads the log file to a server when the program is forced to stop.
- File Upload: Uses Apache HttpClient to upload the log file to a specified server endpoint.
- Java 8 or higher
- Maven
- Internet connection (for uploading the log file)
The project uses the following dependencies:
- JNativeHook
- SLF4J
- Logback
- Apache HttpClient
These dependencies are managed via Maven.
-
Clone the repository:
git clone https://github.com/your-username/your-repo-name.git cd your-repo-name
-
Build the project using Maven:
mvn clean install
-
Run the
App
class to start the key sniffing service:mvn exec:java -Dexec.mainClass="org.Spring.App"
-
The program will log keystrokes to a file named
log<system-name> <date>.txt
. -
When the program is forced to stop, it will print a message and upload the log file to the server endpoint specified in the
ServerUploader
class.
- Server Endpoint: Update the
URI
variable in theServerUploader
class to point to your server's upload endpoint.
This project is licensed under the MIT License. See the LICENSE file for details.