ssdeep Python Wrapper
This is a straightforward Python wrapper for ssdeep by Jesse Kornblum, which is a library for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies. Such inputs have sequences of identical bytes in the same order, although bytes in between these sequences may be different in both content and length.
How to use it
To compute a fuzzy hash, use hash function:
>>> import ssdeep
>>> hash1 = ssdeep.hash('Also called fuzzy hashes, Ctph can match inputs that have homologies.')
>>> hash1
'3:AXGBicFlgVNhBGcL6wCrFQEv:AXGHsNhxLsr2C'
>>> hash2 = ssdeep.hash('Also called fuzzy hashes, CTPH can match inputs that have homologies.')
>>> hash2
'3:AXGBicFlIHBGcL6wCrFQEv:AXGH6xLsr2C'
The compare function returns the match between 2 hashes, an integer value from 0 (no match) to 100.
>>> ssdeep.compare(hash1, hash2)
22
More examples are available in the python-ssdeep documentation.
Install
If all requirements are met it is possible to install the wrapper by using pip or easy_install.
$ pip install ssdeep
The build will fail if the ssdeep library isn’t installed. To use the included version of the ssdeep library use the following command.
$ BUILD_LIB=1 pip install ssdeep
For more information have a look at the python-ssdeep documentation.
Tested on …
CentOS 7
Debian 8, 9
Ubuntu 14.04, 16.04, 18.04
Documentation
Feel free to use the prebuild python-ssdeep documentation or use the steps below to build the documentation.
$ cd docs
$ pip install -r requirements.txt
$ make html
Licensing
The code is licensed under the terms of the LGPLv3+.
This wrapper includes the unchanged source distribution of ssdeep version 2.14.1. It is licensed under the GPLv2.
Metadata
Release files for ssdeep 3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ssdeep-3.4.tar.gz | 110.8 kB | Without provenance | Details for ssdeep-3.4.tar.gz |
Release files / ssdeep-3.4.tar.gz
| Download URL | ssdeep-3.4.tar.gz |
|---|---|
| Size | 110.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b5510716bc495a2b18300ea837fcf944552a1cc678bb74e384bce251d99a85f
|
|
BLAKE2b-256 checksum How to use checksums |
e0d3f17602a7dde1231d332f4067fdd421057ffe335c3bbc295e7ccfab769d95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for ssdeep 3.4
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.