2016-04-21 137 views
2
[email protected]:~/ROUTER# binwalk new-firmware.bin 

DECIMAL  HEXADECIMAL  DESCRIPTION 
-------------------------------------------------------------------------------- 
84   0x54   uImage header, header size: 64 bytes, header CRC: 0xE52A7F50, created: 2012-02-10 07:27:12, image size: 819799 bytes, Data Address: 0x80002000, Entry Point: 0x801AC9F0, data CRC: 0x6A10D412, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: "Linux Kernel Image" 
148   0x94   LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 2386252 bytes 
917588  0xE0054   Squashfs filesystem, little endian, version 4.0, compression:lzma, size: 2588426 bytes, 375 inodes, blocksize: 16384 bytes, created: 2016-02-05 02:05:56 

[email protected]:~/ROUTER# dd if=new-firmware.bin of=uboot.lzma skip=148 bs=1 
3735488+0 records in 
3735488+0 records out 
3735488 bytes (3.7 MB, 3.6 MiB) copied, 4.16712 s, 896 kB/s 

[email protected]:~/ROUTER# dd if=new-firmware.bin of=kernel.squash skip=917588 bs=1 
2818048+0 records in 
2818048+0 records out 
2818048 bytes (2.8 MB, 2.7 MiB) copied, 3.46517 s, 813 kB/s 

一切看起來到目前爲止已經工作,但後來我嘗試以下方法:Binwalk - 壓縮的數據被損壞的/壓縮的數據被損壞

[email protected]:~/ROUTER# lzma -d uboot.lzma 
lzma: uboot.lzma: Compressed data is corrupt 

[email protected]:~/ROUTER# unsquashfs kernel.squash 
Parallel unsquashfs: Using 4 processors 
lzma uncompress failed with error code 0 
read_block: failed to read block @0x277af0 
read_fragment_table: failed to read fragment table index 
FATAL ERROR:failed to read fragment table 

任何想法,爲什麼它會是這樣嗎?正如提示所說,我在Kali Linux上。也讓這個

[email protected]:~/Firmware$ binwalk -e new-firmware.bin 

DECIMAL  HEXADECIMAL  DESCRIPTION 
-------------------------------------------------------------------------------- 
84   0x54   uImage header, header size: 64 bytes, header CRC: 0xE52A7F50, created: 2012-02-10 07:27:12, image size: 819799 bytes, Data Address: 0x80002000, Entry Point: 0x801AC9F0, data CRC: 0x6A10D412, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: "Linux Kernel Image" 
148   0x94   LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 2386252 bytes 

WARNING: Extractor.execute failed to run external extractor 'sasquatch -p 1 -le -d '%%squashfs-root%%' '%e'': [Errno 2] No such file or directory 

WARNING: Extractor.execute failed to run external extractor 'sasquatch -p 1 -be -d '%%squashfs-root%%' '%e'': [Errno 2] No such file or directory 
917588  0xE0054   Squashfs filesystem, little endian, version 4.0, compression:lzma, size: 2588426 bytes, 375 inodes, blocksize: 16384 bytes, created: 2016-02-05 02:05:56 
+0

也許提供了尺寸,而不是補償的數字?在這種情況下,您需要使用'skip = 84'而不是'skip = 148',這樣您就可以開始使用LZMA數據... – twalberg

+0

這樣做並得到了:lzma:uboot.lzma:文件格式未能識別 – pee2pee

回答

0

嘗試

lzma -d <uboot.lzma> uboot 

您發現該錯誤是由於LZMA utils的由XV工具,其中不忽略尾隨垃圾已被取代。如果你將它用作流(就像我給你的那樣),最後你仍然會有腐敗錯誤消息,但是你會得到你的文件。

Source(搜索「腐敗」,你會發現其他相關的評論)