Skip to content

Commit

Permalink
Fix for Unblob's ExtractionConfig breaking change
Browse files Browse the repository at this point in the history
Unblob changed the ExtractionConfig entropy_depth keyword argument to
randomness_depth in 24.11.13. This commit follows suit, and adds a
requirements.txt to pin the version of unblob.
  • Loading branch information
zznop committed Nov 19, 2024
1 parent e2503f1 commit cfed8a8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ The following dependencies are required by this plugin:
* libmagic - Native libmagic file type identification library
* [python-magic](https://github.com/ahupp/python-magic) - Python bindings for libmagic

If the plugin is installed from the Binary Ninja plugin manager, the Python dependencies should install
automatically. However, the `libmagic` native library must be installed manually. The instructions below provide
guidance on how to install the plugin and its dependencies manually. Step 1 is required for all installation methods.

### Darwin

1. Install the `libmagic` native library
Expand All @@ -27,17 +31,18 @@ The following dependencies are required by this plugin:
brew install libmagic
```

2. Install the dependency Python packages for the Python version in use by Binary Ninja. If you are using your system's
Python interpeter, these packages can be installed using PIP.
2. Clone the repository into the Binary Ninja `plugins` directory (or install from the Binary Ninja plugin manager)

```
pip3 install unblob python-magic
git clone git@github.com:Vector35/blob_extractor.git "/Users/$USER/Library/Application Support/Binary Ninja/plugins/blob_extractor"
```

3. Clone the repository into the Binary Ninja `plugins` directory
3. Install the dependency Python packages for the Python version in use by Binary Ninja. These packages should be
installed from the `requirements.txt` file, included in the plugin repository.

```
git clone git@github.com:Vector35/blob_extractor.git "/Users/$USER/Library/Application Support/Binary Ninja/plugins/blob_extractor"
cd "/Users/$USER/Library/Application Support/Binary Ninja/plugins/blob_extractor"
pip3 install -r requirements.txt
```

### Linux
Expand All @@ -48,16 +53,18 @@ git clone git@github.com:Vector35/blob_extractor.git "/Users/$USER/Library/Appli
sudo apt-get install libmagic1
```

2. Install the dependency Python packages for the Python version in use by Binary Ninja.
2. Clone the repository into the Binary Ninja `plugins` directory (or install from the Binary Ninja plugin manager)

```
pip3 install unblob python-magic
git clone git@github.com:Vector35/blob_extractor.git ~/.binaryninja/plugins/blob_extractor
```

3. Clone the repository into the Binary Ninja `plugins` directory
3. Install the dependency Python packages for the Python version in use by Binary Ninja. These packages should be
installed from the `requirements.txt` file, included in the plugin repository.

```
git clone git@github.com:Vector35/blob_extractor.git "~/.binaryninja/plugins/blob_extractor"
cd ~/.binaryninja/plugins/blob_extractor
pip3 install -r requirements.txt
```

### Windows
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"libmagic1"
]
},
"version": "1.0.2",
"version": "1.0.3",
"author": "Vector 35 Inc.",
"minimumbinaryninjaversion": 5333
}
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
unblob==24.11.13
python-magic==0.4.27
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def _extract_from_file(filepath: str, outdir: str, scan_only: bool = False) -> l
configure_logger(0, Path(outdir), log_path)
config = ExtractionConfig(
extract_root=Path(outdir),
entropy_depth=1,
randomness_depth=1,
verbose=0,
)

Expand Down

0 comments on commit cfed8a8

Please sign in to comment.