Hash-Detect is a command-line tool for identifying hash types based on the input string. It checks hashes against various characteristics such as length, prefix, and suffix to make an educated guess on what the possible hash type could be.
Clone the repository to your local machine and build the project.
git clone https://github.com/copyleftdev/hash-detect.git
cd hash-detect
go buildTo identify a single hash, simply run the tool with the hash as an argument.
hash-detect <hash>To identify multiple hashes listed in a text file, use the -f flag followed by the filename.
hash-detect -f <filename>By default, the tool outputs in plain text. You can specify different formats like JSON, XML, or CSV by using the -o flag.
hash-detect -f <filename> -o <format>Supported formats are: json, xml, text, csv
Currently, the tool can detect the following hash types based on their length, prefix, or suffix:
- MD5, CRC32, Adler-32
- SHA-1, RIPEMD
- SHA-224
- SHA-256, BLAKE2, MurmurHash, CityHash, xxHash
- SHA-384
- SHA-512, Whirlpool
- RIPEMD-160, RIPEMD-320
- And more...
While the tool aims to be as accurate as possible, it's worth noting that:
- It makes an educated guess and should not be considered 100% reliable.
- Length-based detection can be ambiguous for certain hash lengths that multiple algorithms share.
- The pattern-based matching is still being improved for better accuracy.
Feel free to contribute to this project by submitting pull requests or opening issues.