{"id":43496606,"url":"https://github.com/quarkslab/python-bindiff","last_synced_at":"2026-02-03T10:38:33.809Z","repository":{"id":191868777,"uuid":"611318323","full_name":"quarkslab/python-bindiff","owner":"quarkslab","description":"Python module wrapping Bindiff usage into a Python API.","archived":false,"fork":false,"pushed_at":"2026-01-19T10:18:34.000Z","size":101,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-19T17:38:42.011Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://diffing.quarkslab.com/differs/bindiff.html#python-bindiff","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quarkslab.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-08T15:23:00.000Z","updated_at":"2026-01-19T10:18:37.000Z","dependencies_parsed_at":"2023-11-15T23:24:09.452Z","dependency_job_id":"a631ed59-ae6e-4dcb-b452-3add164af15d","html_url":"https://github.com/quarkslab/python-bindiff","commit_stats":null,"previous_names":["quarkslab/python-bindiff"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/quarkslab/python-bindiff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkslab%2Fpython-bindiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkslab%2Fpython-bindiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkslab%2Fpython-bindiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkslab%2Fpython-bindiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quarkslab","download_url":"https://codeload.github.com/quarkslab/python-bindiff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkslab%2Fpython-bindiff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29041862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-03T10:38:33.224Z","updated_at":"2026-02-03T10:38:33.791Z","avatar_url":"https://github.com/quarkslab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Bindiff\n\n``python-bindiff`` is a python module aiming to give a friendly interface to launch\nand manipulate bindiff between two binary iles.\n\nHow it works ?\n--------------\n\nThe module relies on [python-binexport](https://github.com/quarkslab/python-binexport)\nto extract programs .BinExport and then directly interact with the binary ``differ``\n(of zynamics) to perform the diff. The generated diff file is then correlated\nwith the two binaries to be able to navigate the changes.\n\nInstallation\n------------\n\nThe python module requires Bindiff. Thus first refers to [Zynamics installation directives](https://www.zynamics.com/software.html).\n\nThen the python module can be installed with: \n\n    pip install python-bindiff\n\nThe python module needs to execute the `differ` executable. As such it should be available:\n* either in the path\n* or via the ``BINDIFF_PATH`` environment variable\n\n\nUsage as a python module\n------------------------\n\nThe simplest way to get the programs, already exported with BinExport, diffed, is:\n\n```python\nfrom bindiff import BinDiff\n\ndiff = BinDiff.from_binary_files(\"sample1.exe\", \"sample2.exe\", \"out.BinDiff\")\n\n# or performing the diff on BinExport files\ndiff = BinDiff.from_binexport_files(\"sample1.BinExport\", \"sample2.BinExport\", \"out.BinDiff\")\n```\n\nTo load the diffing results of an **existing** diff.BinDiff file, do:\n\n```python\nfrom bindiff import BinDiff\n\ndiff = BinDiff(\"sample1.BinExport\", \"sample2.BinExport\", \"diff.BinDiff\")\nprint(diff.similarity, diff.confidence)\n# do whatever you want with diff.primary, diff.secondary which are the\n# two Program object\n```\n\nBut programs can be instanciated separately:\n\n```python\nfrom binexport import ProgramBinExport\nfrom bindiff import BinDiff\np1 = ProgramBinExport(\"sample1.BinExport\")\np2 = ProgramBinExport(\"sample2.BinExport\")\n\ndiff = BinDiff(p1, p2, \"diff.BinDiff\")\n```\n\n**Note that all the diff data are embedded inside program objects thus\nafter instanciating BinDiff those ``p1`` and ``p2`` are modified.**\n\nFrom the API it is also possible to directly perform the BinExport\nextraction and the diffing:\n\n\nUsage as a command line\n-----------------------\n\nThe ``bindiffer`` command line allows to generate a diff file from the two\n.BinExport files or directly from the binaries (thanks to python-binexport and\nidascript). The help message is the following:\n    \n    Usage: bindiffer [OPTIONS] \u003cprimary file\u003e \u003csecondary file\u003e\n    \n      bindiffer is a very simple utility to diff two binary files using BinDiff in command line. The two input files can be either binary files (in which case\n      IDA is used) or directly .BinExport file (solely BinDiff is used).\n    \n    Options:\n      -i, --ida-path PATH      IDA Pro installation directory\n      -b, --bindiff-path PATH  BinDiff differ directory\n      -t, --type \u003ctype\u003e        inputs files type ('bin', 'binexport') [default:'bin']\n      -o, --output PATH        Output file matching\n      -h, --help               Show this message and exit.\n\nTo work bindiff ``differ`` binary should be in the ``$PATH``, given via\nthe ``BINDIFF_PATH`` environment variable or with the ``-b`` command option.\nSimilarly when diff binaries directly the ida64 binary should be available\nin the $PATH, given with the ``IDA_PATH`` environment variable or via the\n``-i`` command option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarkslab%2Fpython-bindiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquarkslab%2Fpython-bindiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarkslab%2Fpython-bindiff/lists"}