[url]http://www.devttys0.com/2012/12/binwalk-0-5-release/[/url]
[quote]
[color=darkblue][b]binwalk --dd='gzip:gz:gunzip %e' firmware.bin[/b][/color]
[/quote]
The above command instructs Binwalk to extract any file whose description contains the text ‘gzip’, save it to disk with a ‘gz’ file extension, and to then run the ‘gunzip %e’ command (the %e is a placeholder that will be replaced with the actual name of the extracted file). This allows for auto extraction and decompression of gzipped files.
Although multiple –dd options may be specified, there are probably several common file types that you always want to be extracted whenever they are encountered. Binwalk 0.5 allows you to place multiple –dd arguments into the $HOME/.binwalk/extract.conf file:
[quote]
# Extract and decompress gzip and lzma files
[color=darkblue][b]gzip:gz:gunzip %e
lzma:7z:7zip -d %e
[/b][/color]
# Extract private keys, but don't run anything
private key:key
[/quote]
[quote]
[color=darkblue][b]binwalk --dd='gzip:gz:gunzip %e' firmware.bin[/b][/color]
[/quote]
The above command instructs Binwalk to extract any file whose description contains the text ‘gzip’, save it to disk with a ‘gz’ file extension, and to then run the ‘gunzip %e’ command (the %e is a placeholder that will be replaced with the actual name of the extracted file). This allows for auto extraction and decompression of gzipped files.
Although multiple –dd options may be specified, there are probably several common file types that you always want to be extracted whenever they are encountered. Binwalk 0.5 allows you to place multiple –dd arguments into the $HOME/.binwalk/extract.conf file:
[quote]
# Extract and decompress gzip and lzma files
[color=darkblue][b]gzip:gz:gunzip %e
lzma:7z:7zip -d %e
[/b][/color]
# Extract private keys, but don't run anything
private key:key
[/quote]
本文介绍了如何使用binwalk命令批量提取并解压特定类型的压缩文件(如.gz和.lzma),并通过配置文件实现自动化操作。通过设置多个--dd参数,可以自动处理常见文件类型。
2691

被折叠的 条评论
为什么被折叠?



