1、前往 https://github.com/devttys0/binwalk 下载文件包
2、解压缩
3、cd binwalk
4、python setup.py install
扫描 vmlinux 示例:
binwalk vmlinux
如果出现如下错误:
[root@test binwalk-2.3.3]# binwalk ../vmlinuxTraceback (most recent call last):
File “/usr/bin/binwalk”, line 2, in <module>
from binwalk.__main__ import main
File “/usr/lib/python2.7/site-packages/binwalk/__init__.py”, line 4, in <module>
from binwalk.core.version import __version__ # This file is auto-generated by setup.py and ignored by .gitignore
File “/usr/lib/python2.7/site-packages/binwalk/core/version.py”, line 11, in <module>
import pkg_resources
ImportError: No module named pkg_resources
解决方法:yum install gcc python-setuptools python-devel
再次执行命令会有如下输出:
[root@test binwalk-2.3.3]# binwalk ../vmlinuxDECIMAL HEXADECIMAL DESCRIPTION
——————————————————————————–
0 0x0 ELF, 64-bit LSB executable, AMD x86-64, version 1 (SYSV)
使用 -e 参数可以生成 ex
[root@test binwalk-2.3.3]# binwalk -e ../vmlinux –run-as=rootDECIMAL HEXADECIMAL DESCRIPTION
——————————————————————————–
0 0x0 ELF, 64-bit LSB executable, AMD x86-64, version 1 (SYSV)
执行后在当前目录生成了 _vmlinux-ikuai.extracted