A simple tool to generate and verify checksums for files.
| Topic | Go |
|---|---|
| About | ⬇️ |
| Prerequisites/Dependencies | ⬇️ |
| Installation | ⬇️ |
| Usage and Examples | ⬇️ |
| Configuration | ⬇️ |
| Roadmap | ⬇️ |
CoolCheckSums is a simple, cross-platform Python program designed to compute and compare checksums for files. It is designed to be easy to use and understand, and is intended to be used by anyone who needs to verify the integrity of files.
While there are ways to generate checksums on every platform, they are usually different and slow down the process of verifying the integrity of files. CCS shares one syntax across all platforms, and is designed to be as simple as possible.
- Written in
Python 3.10, but should work with most versions of Python 3. - All dependencies are included in the standard library.
- Any modern operating system with a Python interpreter should be able to run CCS.
Currently, there is no way to install per se. You can clone the repository and directly run ccs.py with python3 or python depending on your OS.
To run CCS on Linux or macOS, you would have to use the following command:
python3 src/ccs.pyObviously, this is inconvenient. In that case you have a few options:
You can create an alias in your shell configuration file. For example, in ~/.bashrc or ~/.zshrc:
alias ccs="python3 /path/to/ccs.py"You can add the directory containing CCS to your PATH. For example, in ~/.bashrc or ~/.zshrc:
If you choose this option, it's better if you created a bash script that runs CCS, and add the directory containing the bash script to your PATH.
You can find an (extremely simple) example bash script in examples/ccs.sh.
export PATH=$PATH:/path/to/ccs.shTo run CCS on Windows, you would have to use the following command:
python src\ccs.pyAs with Linux and macOS, this is inconvenient. In that case you have a few options:
You can add the directory containing CCS to your PATH. For example, in System Properties > Environment Variables:
If you choose this option, it's better if you created a batch script that runs CCS, and add the directory containing the batch script to your PATH.
You can find an (extremely simple) example batch script in examples\ccs.bat.
Eventually, CCS will have native binaries for Windows, Linux, and macOS. For that release, I plan to streamline/automate the installation process.
There are four main cases in which CCS can be used:
If you don't specify an algorithm with -a or --algorithm, CCS will generate checksums for the file using every algorithm available.
ccs <file_path>If you specify an algorithm with -a or --algorithm, CCS will generate a checksum for the file using that algorithm.
ccs <file_path> -a {md5,sha1,sha224,sha256,sha384,sha512}If you don't specify an algorithm with -a or --algorithm to check with, CCS will verify the checksums for the file using every algorithm available (either by guessing or by brute force).
ccs <file_path> <checksum>If you specify an algorithm with -a or --algorithm to check with, CCS will verify the checksum for the file using that algorithm.
ccs <file_path> <checksum> -a {md5,sha1,sha224,sha256,sha384,sha512}Aside from the main cases, there are a few other arguments that can be used:
-hor--help: Display the help message.-vor--version: Display the version of CCS.-mor--machine-readable: Output the checksums/compare results in a machine-readable format. It disables the excess output, and displays the information in a format such as a boolean.
At the moment, there is not much to configure in CCS. However, I have implemented a configuration loader that can read a config.json file in the root directory of the repository.
An example config.json file is as follows:
{
"buffer_size": 65536
}In the case that the config.json file is not found, the default values (config.py) will be used.
Currently, the main goal is to release executables for Windows, Linux, and macOS.