1、简单安装
在ubuntu的终端上执行以下命令:
$ sudo su //然后输入密码,获取root权限,避免后期执行命令时出现权限不够的情况。
$ sudo apt-get remove binwalk //卸载原有的旧版binwalk(如果有的话),采用git的方式进行安装,以便得到更好的更新。
$ sudo apt-get update //更新软件
$ sudo apt-get install build-essential autoconf git //获取开发工具git
$ git clone https://github.com/devttys0/binwalk //从git上获取binwalk的源代码
$ cd binwalk //进入binwalk文件夹
$ sudo python3 setup.py install //导入python3环境
若在执行 sudo python3 setup.py install出现Command ModuleNotFoundError: No module named 'distutils.core'错误,解决办法是:
sudo apt-get install python3-pip
以上是binwalk的简单安装功能有限,只能将对设备的固件进行文件组成格式的分析和设备的文件系统进行提取,不能对提取后的设备文件系统进行解压处理。要binwalk工具能对提取后的设备文件系统进行解压还需要安装binwalk工具需要的依赖库和组件工具。
二,依赖库和组件工具安装
Besides a Python interpreter, there are no installation dependencies for binwalk. All dependencies are optional run-time dependencies, and unless otherwise specified, are available from most Linux package managers
Binwalk uses the pycrypto
library to decrypt some known encrypted firmware images:
# Python3.x
$ sudo apt-get install python3-crypto
Binwalk uses pyqtgraph to generate graphs and visualizations, which requires the following:
# Python3.x
$ sudo apt-get install libqt4-opengl python3-opengl python3-pyqt4 python3-pyqt4.qtopengl python3-numpy python3-scipy python3-pip
$ sudo pip3 install pyqtgraph
具体参考:https://blog.csdn.net/qq1084283172/article/details/65441110