From 3cd9a4da3653a0cc516dff9f3286bb2f6dd02969 Mon Sep 17 00:00:00 2001 From: Tobias Schramm <tobleminer@gmail.com> Date: Thu, 1 Feb 2018 02:55:25 +0100 Subject: [PATCH] Fix Ubiquiti partiton PART and END headers The zero-padding used to identify the PART and END headers is not part of the header itself but rather padding from previous data structures. That is totally fine since the padding will always be there when analyzing Ubiquiti firmware images. --- src/binwalk/magic/firmware | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/binwalk/magic/firmware b/src/binwalk/magic/firmware index 425dd64..67ace17 100644 --- a/src/binwalk/magic/firmware +++ b/src/binwalk/magic/firmware @@ -453,16 +453,16 @@ >4 byte 0 {invalid}, >4 string x version: "%s" -4 string \x00\x00\x00\x00PART Ubiquiti partition header, +-4 string \x00\x00\x00\x00PART Ubiquiti partition header, >0 byte x header size: 56 bytes, ->8 byte 0 {invalid} ->8 string x name: "%s", ->44 ubelong x base address: 0x%.8X, ->52 belong x data size: %d bytes{size:%d} - -4 string \x00\x00\x00\x00END\x2e Ubiquiti end header, header size: 12 bytes, ->12 belong !0 {invalid}, ->8 ubelong x cumulative ~CRC32: 0x%.8X +>0 byte 0 {invalid} +>0 string x name: "%s", +>40 ubelong x base address: 0x%.8X, +>48 belong x data size: %d bytes{size:%d} + +-4 string \x00\x00\x00\x00END\x2e Ubiquiti end header, header size: 12 bytes, +>8 belong !0 {invalid}, +>4 ubelong x cumulative ~CRC32: 0x%.8X # Found in DIR-100 firmware -- libgit2 0.26.0