我有一个D-Link DCS-931LIP 摄像头开始经常丢失 wifi 连接。为了调试这个问题,我尝试登录,但任何远程访问都被禁止(除了 Web 界面,但对我来说没用)。所以我决定玩一下摄像头固件。使用 binwalk 查看和提取固件内容相对容易:
$ binwalk -t dcs931l_v107_b1.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 uImage header, header size: 64 bytes, header CRC:
0x87952F3D, created: Wed Feb 4 17:09:26 2015,
image size: 128432 bytes, Data Address:
0x80200000, Entry Point: 0x80200000, data CRC:
0x22AE437C, OS: Linux, CPU: MIPS, image type:
Standalone Program, compression type: none,
image name: "SPI Flash Image"
99296 0x183E0 U-Boot version string, "U-Boot 1.1.3"
115616 0x1C3A0 HTML document header
115969 0x1C501 HTML document footer
115972 0x1C504 HTML document header
116171 0x1C5CB HTML document footer
116332 0x1C66C HTML document header
117032 0x1C928 HTML document footer
327680 0x50000 uImage header, header size: 64 bytes, header CRC:
0x99A49EC1, created: Wed Feb 4 17:09:20 2015,
image size: 7383128 bytes, Data Address:
0x80000000, Entry Point: 0x8038D000, data CRC:
0x6FA27193, OS: Linux, CPU: MIPS, image type: OS
Kernel Image, compression type: lzma, image
name: "Linux Kernel Image"
327744 0x50040 LZMA compressed data, properties: 0x5D,
dictionary size: 33554432 bytes, uncompressed
size: 9988726 bytes
“LZMA 压缩数据”块包含实际系统,可以在那里启用 telnet 并进行其他修改。
但是 binwalk 似乎无法将系统重新包装成适合下载到相机中的固件文件。有人能解释一下或指出一个资源来解释如何创建这个固件文件吗?