Commit 3c87c3b7 by devttys0

Fixed gzip signature tags

parent f7f36692
...@@ -93,18 +93,17 @@ ...@@ -93,18 +93,17 @@
#0 string \037\213\x08 gzip compressed data #0 string \037\213\x08 gzip compressed data
0 string \x1f\x8b\x08 gzip compressed data 0 string \x1f\x8b\x08 gzip compressed data
>3 byte &0x01 \b, ASCII >3 byte &0x01 \b, ASCII
>3 byte&0xE0 !0x00 \b, {invalid} reserved flag bits >3 byte&0xE0 !0x00 \b, {invalid}invalid reserved flag bits
>8 byte 2 \b, maximum compression >8 byte 2 \b, maximum compression
>8 byte 4 \b, fastest compression >8 byte 4 \b, fastest compression
>8 byte 1 \b, {invalid} extra flags >8 byte 1 \b, {invalid}invalid extra flags
>8 byte 3 \b, {invalid} extra flags >8 byte 3 \b, {invalid}invalid extra flags
>8 byte >4 \b, {invalid} extra flags >8 byte >4 \b, {invalid}invalid extra flags
>3 byte &0x02 \b, has header CRC >3 byte &0x02 \b, has header CRC
>3 byte&0x04 0x04 >3 byte&0x04 0x04
>>10 leshort x \b, has %d bytes of extra data >>10 leshort x \b, has %d bytes of extra data
>3 byte&0xC =0x08 \b, has original file name >3 byte&0xC =0x08 \b, has original file name
>>10 string x \b{file-name:%s} >>10 string x \b: "%s"{name:%s}
>>10 string x \b: "%s"
>3 byte &0x10 \b, has comment >3 byte &0x10 \b, has comment
>>3 byte&0xC 0 >>3 byte&0xC 0
>>>10 string x \b: "%s" >>>10 string x \b: "%s"
......
...@@ -125,8 +125,7 @@ class Extractor(Module): ...@@ -125,8 +125,7 @@ class Extractor(Module):
# Note that r.display is still True even if --quiet has been specified; it is False if the result has been # Note that r.display is still True even if --quiet has been specified; it is False if the result has been
# explicitly excluded via the -y/-x options. # explicitly excluded via the -y/-x options.
if r.valid and r.extract and r.display: if r.valid and r.extract and r.display:
# Do the extraction # Attempt extraction
binwalk.core.common.debug("Attempting extraction...")
(extraction_directory, dd_file) = self.extract(r.offset, r.description, r.file.name, size, r.name) (extraction_directory, dd_file) = self.extract(r.offset, r.description, r.file.name, size, r.name)
# If the extraction was successful, self.extract will have returned the output directory and name of the dd'd file # If the extraction was successful, self.extract will have returned the output directory and name of the dd'd file
...@@ -354,6 +353,8 @@ class Extractor(Module): ...@@ -354,6 +353,8 @@ class Extractor(Module):
# No extraction rules for this file # No extraction rules for this file
if not rules: if not rules:
return (None, None) return (None, None)
else:
binwalk.core.common.debug("Found %d matching extraction rules" % len(rules))
output_directory = self.build_output_directory(file_name) output_directory = self.build_output_directory(file_name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment