This program modifies Git commits by appending a nonce to the committer name and searching for specific hash properties, such as a desired hash prefix or a hidden message. It uses multithreading to speed up the search process.
- Search for a Git commit hash that starts with a specific prefix.
- Search for a Git commit hash that contains a hidden message.
- Multithreaded execution for faster processing.
- Adjustable starting nonce and thread count.
- Rust (stable version)
- A Git repository (the program operates on the current repository)
-
Clone the repository:
git clone <repository-url> cd <repository-folder>
-
Build the program in release mode:
cargo build --release
-
The compiled binary will be located in the
target/releasedirectory.
Run the program from the root of a Git repository. The program modifies the most recent commit.
cargo run --release -- [OPTIONS]or using the executable directly assuming you have added it to your path:
git-custom-hash [OPTIONS]| Option | Description |
|---|---|
-h <prefix> |
Specify the desired hash prefix (e.g., -h 000000). |
-m <message> |
Specify a hidden message to search for in the hash (e.g., -m deadbeef). |
-n <nonce> |
Specify the starting nonce as a hexadecimal value (default: 1). |
-j <threads> |
Specify the number of threads to use (default: number of CPU cores). |
cargo run --release -- -h 000000This command searches for a commit hash that starts with 000000.
Search for a Hash Containing a Hidden Message
cargo run --release -- -m deadbeefThis command searches for a commit hash that contains the hidden message deadbeef.
cargo run --release -- -h 000000 -n 1AThis command starts the search with a hexadecimal nonce of 0x1A (decimal 26). This is useful in cases where the previous search was halted early, but the last used nonce is known (command line output)
cargo run --release -- -h 000000 -j 4This command uses 4 threads for the search.
cargo run --release -- -h 000000 -m deadbeef -n 100 -j 8This command searches for a hash that starts with 000000 and contains the hidden message deadbeef, starting with a nonce of 0x100 (decimal 256) and using 8 threads.
The program outputs the following information during execution:
- Hashes per Second: The number of hashes being tested per second, displayed every 5 seconds.
- Most Recent Nonce: The most recently tested nonce value in hexadecimal format.
- Result: If a matching hash is found, the program outputs the nonce that produced it.
Example output:
Searching for hash starting with: 000000
Starting nonce: 1
Using 8 threads.
Hashes per second: 50K Most recent nonce: 1F4
Hashes per second: 52K Most recent nonce: 3E8
A thread found: 0000001A
- The program modifies the most recent commit in the current Git repository. Ensure you have a backup or are working in a safe environment before running the program.
- If no matching hash is found, the program will terminate without making changes to the repository.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Feel free to open issues or submit pull requests.