Commit 5b7bfef5 by devttys0

Fixed extraction bug and additional bugs in cpio plugin

parent a73eed4c
...@@ -106,8 +106,8 @@ class Extractor(Module): ...@@ -106,8 +106,8 @@ class Extractor(Module):
else: else:
size = r.size size = r.size
# Only extract valid results # Only extract valid results marked for extraction
if r.valid: if r.valid and r.extract:
# Do the extraction # Do the 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)
......
...@@ -24,7 +24,8 @@ class CPIOPlugin(binwalk.core.plugin.Plugin): ...@@ -24,7 +24,8 @@ class CPIOPlugin(binwalk.core.plugin.Plugin):
elif 'TRAILER!!!' in result.description: elif 'TRAILER!!!' in result.description:
# This is the last entry, un-set found_archive. # This is the last entry, un-set found_archive.
self.found_archive = False self.found_archive = False
result.extract = False
# The first entry has already been found and this is the last entry, or the last entry else:
# The first entry has already been found and this is not the last entry, or the last entry
# has not yet been found. Don't extract. # has not yet been found. Don't extract.
result.extract = False result.extract = False
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