Skip to content

Commit d227c85

Browse files
Roxane Cohenpatacca
Roxane Cohen
authored andcommitted
fix diffing doc
1 parent 88695be commit d227c85

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

README.md

+13-10
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,18 @@ The python module needs to execute the `differ` executable. As such it should be
2828
Usage as a python module
2929
------------------------
3030

31-
The simplest way to get the programs diffed is:
31+
The simplest way to get the programs, already exported with BinExport, diffed, is:
32+
33+
```python
34+
from bindiff import BinDiff
35+
36+
diff = BinDiff.from_binary_files("sample1.exe", "sample2.exe", "out.BinDiff")
37+
38+
# or performing the diff on BinExport files
39+
diff = BinDiff.from_binexport_files("sample1.BinExport", "sample2.BinExport", "out.BinDiff")
40+
```
41+
42+
To load the diffing results of an **existing** diff.BinDiff file, do:
3243

3344
```python
3445
from bindiff import BinDiff
@@ -56,14 +67,6 @@ after instanciating BinDiff those ``p1`` and ``p2`` are modified.**
5667
From the API it is also possible to directly perform the BinExport
5768
extraction and the diffing:
5869

59-
```python
60-
from bindiff import BinDiff
61-
62-
diff = BinDiff.from_binary_files("sample1.exe", "sample2.exe", "out.BinDiff")
63-
64-
# or performing the diff on BinExport files
65-
diff = BinDiff.from_binexport_files("sample1.BinExport", "sample2.BinExport", "out.BinDiff")
66-
```
6770

6871
Usage as a command line
6972
-----------------------
@@ -88,4 +91,4 @@ To work bindiff ``differ`` binary should be in the ``$PATH``, given via
8891
the ``BINDIFF_PATH`` environment variable or with the ``-b`` command option.
8992
Similarly when diff binaries directly the ida64 binary should be available
9093
in the $PATH, given with the ``IDA_PATH`` environment variable or via the
91-
``-i`` command option.
94+
``-i`` command option.

0 commit comments

Comments
 (0)