到目前为止,我一直试图在一个非常大的转储文件上使用 binwalk,但没有取得太大的成功。每次我尝试使用它时,它都会生成非常大的 zip 文件来填充磁盘,直到我遇到磁盘已满错误(使用 Linux)。
我试图了解我做错了什么,所以这里有一个简单的场景,希望能理解我做错了什么。
脚步:
$ dd if=/dev/zero of=head bs=1 count=512
$ dd if=/dev/zero of=tail bs=1 count=512
$ wget https://github.com/devttys0/binwalk/archive/master.zip
$ cat head binwalk-master.zip tail > full
$ binwalk -z -C demo -D 'zip archive:zip:unzip %e' full
有人可以让我知道为什么我看到以下内容:
$ find demo
demo
demo/_full.extracted
demo/_full.extracted/483BD.zip
demo/_full.extracted/200.zip
这个文件来自哪里?有什么理由保留它吗?
$ unzip -l demo/_full.extracted/483BD.zip
Archive: demo/_full.extracted/483BD.zip
5be61ad220a42e7b2c7e912024fda5edd84b4843
error [demo/_full.extracted/483BD.zip]: missing 295357 bytes in zipfile
(attempting to process anyway)
error [demo/_full.extracted/483BD.zip]: attempt to seek before beginning of zipfile
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
额外问题:有没有办法真正只提取 zip 文件(删除tail内容):
$ crc32 binwalk-master.zip demo/_full.extracted/200.zip
8ce4d36c binwalk-master.zip
81923fef demo/_full.extracted/200.zip
$ ls -al binwalk-master.zip demo/_full.extracted/200.zip
-rw-r--r-- 1 user user 295419 Sep 29 08:54 binwalk-master.zip
-rw-r--r-- 1 user user 295931 Sep 29 09:02 demo/_full.extracted/200.zip