# Timer Project A Rust-based timer application that implements a time-based execution control mechanism. This project demonstrates how to create a program that checks the time elapsed since compilation and executes specific actions based on a predefined time threshold. Downlaod Timer PoC : [Downlaod](https://download.5mukx.site/#/home?url=https://github.com/Whitecat18/Rust-for-Malware-Development/tree/main/timer) ## Features - Tracks time elapsed since program compilation - Implements a configurable time threshold (default: 1 day) - Provides countdown information until the target time - Exits with a specific status code when the time threshold is reached ## Technical Details The program uses: - `chrono` crate for datetime handling - Build-time environment variables to capture compilation timestamp - Time difference calculation between current time and build time ## Prerequisites - Rust (latest stable version) - Cargo (comes with Rust) ## Building To build the project: ```bash cargo build ``` ## Running To run the project: ```bash cargo run ``` ## How It Works 1. The program captures the build time during compilation using environment variables 2. When executed, it calculates the time difference between the current time and build time 3. If the elapsed time exceeds the configured threshold (1 day by default): - Prints "Time of attack!" - Exits with status code -1 4. If the threshold hasn't been reached: - Displays the remaining time until the threshold ## Configuration The time threshold can be modified by changing the `TIME_ATTACK_IN_DAYS` constant in `src/main.rs`. ## Credits / References Found the idea while discussion. The author did not known !. Rust by : [@5mukx](https://x.com/5mukx)