{"id":13456043,"url":"https://github.com/hashdd/pyhashdd","last_synced_at":"2025-03-24T09:31:21.361Z","repository":{"id":17828262,"uuid":"82574117","full_name":"hashdd/pyhashdd","owner":"hashdd","description":"A python library for building and using hash databases.","archived":false,"fork":false,"pushed_at":"2023-02-08T00:54:41.000Z","size":573,"stargazers_count":22,"open_issues_count":4,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-28T23:33:49.420Z","etag":null,"topics":["hashdatabase","hashing"],"latest_commit_sha":null,"homepage":"https://www.hashdd.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hashdd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-20T15:41:30.000Z","updated_at":"2024-08-13T14:04:23.000Z","dependencies_parsed_at":"2024-10-28T23:31:22.285Z","dependency_job_id":null,"html_url":"https://github.com/hashdd/pyhashdd","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashdd%2Fpyhashdd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashdd%2Fpyhashdd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashdd%2Fpyhashdd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashdd%2Fpyhashdd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashdd","download_url":"https://codeload.github.com/hashdd/pyhashdd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245243267,"owners_count":20583595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hashdatabase","hashing"],"created_at":"2024-07-31T08:01:15.373Z","updated_at":"2025-03-24T09:31:20.762Z","avatar_url":"https://github.com/hashdd.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# hashdd\n\npyhashdd is a library for building and using hash databases.\n\n# Installation\n\nWith all prerequisites installed, you can install pyhashdd with `pip`, the `[all]` extras directive will install everything to need for extended hashes like `ssdeep` and `pysha3`:\n\n```\npip install hashdd[all]\n```\n\n## Alternative Installations\n\n### Default Installation\nBy default, we don't want to assume you have all of the required prerequisites installed, so we just install the absolute bare minimum for you to use the library as an import. \n\n```\npip install hashdd\n```\n\n### Extended Hashes Installation \n\nMany of our \"extended\" hashes are essentially wrappers around popular OS libraries. These libraries are OS-level dependencies that we dont want to force you to use. So but default we don't install them but give you the option to install them all if you'd like. \n\n```\npip install hashdd[all]\n```\n\n# Docker\n\nBuild the container from the git root:\n```\ndocker build -t hashdd .\n```\n\nCreate a directory to scan, and copy our `sample.exe` into it.\n```\nmkdir files_to_scan/\ncp tests/data/sample.exe files_to_scan/\n```\n\nMount `files_to_scan/` and scan away!\n```\ndocker run --rm -v \"$PWD\"/files_to_scan:/files_to_scan hashdd hashdd compute -d /files_to_scan\n```\n\n## Prerequisites \n\n### Ubuntu\n```\nsudo apt-get install libfuzzy-dev libmhash-dev libffi-dev libssl-dev\n\n```\n\n### OSX/Darwin Prerequisites\n```\nbrew install ssdeep\n\n```\n\n# `hashddcli` Examples\n\nTo recusively (`-d goodfiles/`) calculate the SHA256 hashes of files in the `goodfiles/` directory and add those hashes to a new bloom filter (the bloom filter is stored in `hashdd.bloom`): \n\n```\nhashdd bloom -d goodfiles/\n\n```\n\nWith the bloom filter created, the `bloom` option now compares calculated hashes to the bloom. To calculate the SHA256 hash of `sample.exe` (`-f sample.exe`) and check if it is within the bloom filter (`bloom`):\n\n```\nhashdd bloom -f sample.exe\n\n```\n\nTo calculate (`compute`) all hashes (`--all`) and output them to the screen:\n```\nhashdd compute -f sample.exe --all\n\n```\n\nTo calculate a specific hash type:\n```\nhashdd compute -f sample.exe -a md5w\n\n```\n\n# Library Examples\n\nTo hash a file using all algorithms and features, then store the results in Mongo:\n\n```\n\u003e\u003e\u003e from hashdd import hashdd\n\u003e\u003e\u003e h = hashdd(filename='sample.exe')\n\u003e\u003e\u003e from pymongo import MongoClient\n\u003e\u003e\u003e db = MongoClient().hashdd\n\u003e\u003e\u003e db.hashes.insert_one(h.result)\n\n```\n\n# Testing\n```\npython -m unittest discover -s tests/\n```\n\n# `py-mhash` and `mhashlib`\n\nBack in 2017 [we fixed an issue in py-mhash](https://github.com/niwinz/py-mhash/pull/4) which was merged into the git repository, however this fix was not built as part of the distribution in PyPi. Rather then rely on the package maintainer any further, we've bundled in `py-mhash` with hashdd. Please see the [py-mash license](https://github.com/niwinz/py-mhash/blob/master/LICENSE) for copyright information. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashdd%2Fpyhashdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashdd%2Fpyhashdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashdd%2Fpyhashdd/lists"}