Skip to main content

cashcat

Compare directories recursively using cash hashes

Simple tool for verifying file integrity

Install

pip install cashcat

Example

Check hashes for files:

python -m cashcat check --root ./path-a ./path-b --hashfile ./cashcat.json

Generate hashes for files:

python -m cashcat generate --root ./path-a ./path-b --hashfile ./cashcat.json

Update hashes for files:

python -m cashcat update --root ./path-a ./path-b --hashfile ./cashcat.json

Why?

If you ever wanted to store multiple copies of many files and need to ensure that each medium didn't get corrupted or actually corrupted with data loss - this tool may help.

It simply checks for each file that present in each root recursively by mathing the hash value with hash from storage. You can store hashfile in every place (even on your drives, since it's just a json file) and use it for verification.

This tool works as following:

  • First, it collects all file paths recursivery for each specified root
  • Second, it does set intersection to determine which files exist in each root
  • For every non-in-intersection path it produces a warning
  • For every file in intersection it does hash computation and varifiction agains the varue from storage
    • Every mismatch is reported
    • Every file missing from storage is reported

How to use

This tool has multiple modes of operation described below.

$ python -m cashcat check --help
usage: cashcat [-h] -r ROOT [ROOT ...] [-s HASHFILE] [-v] {check,generate,update}

positional arguments:
  {check,generate,update}
                        action mode: check - checks files agains the hash store; generate - force regenerate all hashes; update - generate hashes only for new files

options:
  -h, --help            show this help message and exit
  -r, --root ROOT [ROOT ...]
                        paths to tree roots, at least 2 roots to compare
  -s, --hashfile HASHFILE
                        path to hash file store
  -v, --verbose         verbose logging

check

Check the integrity using the existing storage file. Does not change anything.

generate

Full overwrite of storage file. Generate hash for every file from set intersection. Does not generate hashes for files that exist only in single root (in case of 2+ roots).

update

Update storage file. Generate hash for every file from set intersection that not exists in storage yet. Does not generate hashes for files that exist only in single root (in case of 2+ roots).

Update of files that has content changed not supported yet.

LICENSE

cashcat - simple file integrity verification tool
Copyright (C) 2025  bitrate16

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Metadata

Release files for cashcat 1004

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cashcat 1004
File Size Uploaded Provenance Actions
cashcat-1004.tar.gz 16.1 kB Without provenance Details for cashcat-1004.tar.gz

Release files / cashcat-1004.tar.gz

Download URL cashcat-1004.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4a59a25d611db79917ebc39ad079ad4e8c616cb90a3b4cda7840cb33851b3b89
BLAKE2b-256 checksum
How to use checksums
ea96a2cfc4a63900837b9a5b4ff5570a13a3c54e497066819062f0c48273925d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.2

Security for cashcat 1004

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1004 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page