This package is a Python wrapper for ssdeep by Jesse Kornblum, which is a library for computing Context Triggered Piecewise Hashes (CTPH).
Installation
$ pip install pyssdeep
Usage
Get a fuzzy hash value for a string:
import pyssdeep
try:
result = pyssdeep.get_hash_buffer(
'The string for which you want to calculate a fuzzy hash'
)
escept pyssdeep.FuzzyHashError as err:
print(err)
except TypeError as err:
print(err)
print('The fuzzy hash value is {}'.format(result))
Get a fuzzy hash value for a file:
import pyssdeep
try:
result = pyssdeep.get_hash_file('e:/file.txt')
escept pyssdeep.FuzzyHashError as err:
print(err)
except IOError as err:
print(err)
print('The fuzzy hash value is {}'.format(result))
Get a fuzzy hash value for a file (using the pep 452 API):
import pyssdeep
buffer_size = 1024
fuzzy_hash_obj = pyssdeep.new()
with open('e:/file.txt', 'rb') as file:
buffer = file.read(buffer_size)
while len(buffer) > 0:
fuzzy_hash_obj.update(buffer)
buffer = file.read(buffer_size)
result = fuzzy_hash_obj.digest()
License
MIT Copyright (c) 2020 Evgeny Drobotun
Release hystory
1.0.0 (20.10.2020)
First release of ‘pyssdeep’
Release files for pyssdeep 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyssdeep-1.0.0.tar.gz | 181.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyssdeep-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 369.0 kB
Release files / pyssdeep-1.0.0.tar.gz
| Download URL | pyssdeep-1.0.0.tar.gz |
|---|---|
| Size | 181.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e6d21538aafc2bae47588a093009fd9572495a4b3001892fa4770692123ad1c
|
|
BLAKE2b-256 checksum How to use checksums |
129e2d9a39fa9071dd764c00bbd31acc51d5fc5b9d4b0eec3596c791a801ade8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.8
|
Release files / pyssdeep-1.0.0-py3-none-any.whl
| Download URL | pyssdeep-1.0.0-py3-none-any.whl |
|---|---|
| Size | 187.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b97f844ef84de66780cecd0a1ff189202c3ce84f6bd3cad7a275fc640c4efb2
|
|
BLAKE2b-256 checksum How to use checksums |
1ba6af1c739fa604382b28168f820fd97ca9929f17bbac0feef45b0e8e7b3ccd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.8
|