Skip to content

Commit

Permalink
Merge pull request #3 from quarkslab/update_binexport
Browse files Browse the repository at this point in the history
Add .gitignore, switch to pyproject.toml and update binexport to v0.2.0
  • Loading branch information
RobinDavid authored Nov 15, 2023
2 parents ed9e72f + 9617624 commit 16ddcff
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 37 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Distribution / packaging
.Python
build/
*.egg-info/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "python-bindiff"
description = "Python wrapper to manipulate bindiff files"
authors = [{ name = "Robin David", email = "[email protected]" }]
license = { text = "Apache Software License (Apache License, Version 2)" }
readme = { file = "README.md", content-type = "text/markdown" }
version = '0.1.5'
requires-python = ">=3.9"
dependencies = ['python-magic', 'click', 'python-binexport>=0.2.0']
classifiers = [
'Topic :: Security',
'Environment :: Console',
'Operating System :: OS Independent',
]

[project.urls]
Homepage = "https://github.com/quarkslab/python-bindiff"
Repository = "https://github.com/quarkslab/python-bindiff"
Documentation = "https://diffing.quarkslab.com/differs/bindiff.html#python-bindiff"
"Bug Tracker" = "https://github.com/quarkslab/python-bindiff/issues"

[tools.setuptools]
script-files = ["bins/bindiffer"]

[tool.black]
line-length = 100
target-version = ['py310']
35 changes: 0 additions & 35 deletions setup.py

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions bindiff/bindiff.py → src/bindiff/bindiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _convert_program_classes(p: ProgramBinExport) -> None:
f.__class__ = FunctionBinDiff
for bb in f.values():
bb.__class__ = BasicBlockBinDiff
for i in bb.values():
for i in bb.uncached_instructions.values():
i.__class__ = InstructionBinDiff

def _map_diff_on_programs(self) -> None:
Expand Down Expand Up @@ -145,7 +145,7 @@ def _map_diff_on_programs(self) -> None:
bb_f1.algorithhm = bb_f2.algorithm = bb_match.algorithm

# Iterate instructions to map them
for ins_f1 in bb_f1.values():
for ins_f1 in bb_f1.uncached_instructions.values():
# Instruction is matched
if ins_f1.addr in self.primary_instruction_match:
# Within the context of the current function
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 16ddcff

Please sign in to comment.