art-of-dom / hash-it

All file hashing, all the time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HashIt

Build Status CodeFactor DeepSource

All file hashing, all the time.

Dev Set up

Being a python project the assumption is that you have it already installed along with some way to set up a development environment. For the rest of this we will be using virtualenv.

From the clone all you need to do is the following:

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

Usage

Can be used to give a quick hash of a file, for example running against our support test file like so will yield:

python -m hashit -f test/support/example.bin --hash-type=CRC32
# input: test/support/example.bin hash: 29058C73

Can also be given an ASCII character string. Running against the input '123456789' will yield the following.

python -m hashit -a 123456789 --hash-type=CRC32
# input: 123456789 hash: CBF43926

If you already have a hash, you can also verify the hash of the file. A non-zero return is issued for this when the hash does not match. An example with the test binary is below:

python -m hashit -f test/support/example.bin --hash-type=CRC32 --verify 29058C73
echo $? # return value is 0

The following will return a non zero value:

python -m hashit -f test/support/example.bin --hash-type=CRC32 --verify DEADBEEF
echo $? # return value is 2

Milestones

  • Displaying File hashes
  • Verification return value
  • ASCII and Hex inputs
  • Brute force verification
  • Reverse input
  • Pipe data to hash-it
  • Data generation based on hash
  • Data generation depth

State of the repo

This project started as just a quick how to hash for data integrity in python. It is a long way from being usable, but feel free to hack around. It is currently being revived and may be unstable for a bit.

About

All file hashing, all the time.

License:MIT License


Languages

Language:Python 95.6%Language:Shell 4.4%