Skip to main content

Python wrapper for the ssdeep library

Project description

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.

Latest Version https://travis-ci.org/DinoTools/python-ssdeep.svg?branch=master

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

For more information have a look at the python-ssdeep documentation.

Licensing

The code is licensed under the terms of the LGPLv3+.

This wrapper includes the unchanged source distribution of ssdeep version 2.10. It is licensed under the GPLv2.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssdeep-3.0.tar.gz (385.6 kB view details)

Uploaded Source

File details

Details for the file ssdeep-3.0.tar.gz.

File metadata

  • Download URL: ssdeep-3.0.tar.gz
  • Upload date:
  • Size: 385.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ssdeep-3.0.tar.gz
Algorithm Hash digest
SHA256 729ac82c699e50f9a8843707698c26b51e26bbb27aa6add813f8e7a9d0e7f567
MD5 cabd8d06fe67f7796df193ef15a68859
BLAKE2b-256 0b6428dc5716ecc972a29ea18110b3cf1477482407796ba5423d8df4981cfb85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page