This is a python SDK for using Binwalk (which is now a Rust project). You can install this library from PyPI.
Note
This library is not exposing every possible feature of binwalk yet. In due time, it might
pip install binwalk-python-sdkgit clone https://github.com/FauvidoTechnologies/binwalk-python-sdk
cd binwalk-python-sdk
pip install -e .- Run a basic scan using the
scanendpoint:
from pybinwalk import scan
result = basic_scan(image_path)
print(type(result))
# List- Run an
extractionon a binary and save the results to a specified directory:
from pybinwalk import extract
in_bin = "/path/to/input/binary"
out_dir = "/path/to/output/DIR"
result = extract(in_bin, out_dir)- Install dependencies for your OS (currently supports Ubuntu) using the
Manager:
from pybinwalk import Manager
Manager(stream=True).handle_deps() # This produces a verbose streaming log as it installs all dependencies