Commit bf70f753 by devttys0

Added extractor debug statements

parent 2fa565fc
...@@ -519,6 +519,7 @@ class Extractor(Module): ...@@ -519,6 +519,7 @@ class Extractor(Module):
except Exception as e: except Exception as e:
raise Exception("Extractor.dd failed to extract data from '%s' to '%s': %s" % (file_name, fname, str(e))) raise Exception("Extractor.dd failed to extract data from '%s' to '%s': %s" % (file_name, fname, str(e)))
binwalk.core.common.debug("Carved data block 0x%X - 0x%X from '%s' to '%s'" % (offset, offset+size, file_name, fname))
return fname return fname
def execute(self, cmd, fname): def execute(self, cmd, fname):
...@@ -550,10 +551,13 @@ class Extractor(Module): ...@@ -550,10 +551,13 @@ class Extractor(Module):
cmd = cmd.replace(self.FILE_NAME_PLACEHOLDER, fname) cmd = cmd.replace(self.FILE_NAME_PLACEHOLDER, fname)
# Execute. # Execute.
if subprocess.call(shlex.split(cmd), stdout=tmp, stderr=tmp) == 0: rval = subprocess.call(shlex.split(cmd), stdout=tmp, stderr=tmp)
if rval == 0:
retval = True retval = True
else: else:
retval = False retval = False
binwalk.core.common.debug('External extractor command "%s" completed with return code %d' % (cmd, rval))
except KeyboardInterrupt as e: except KeyboardInterrupt as e:
raise e raise e
except Exception as e: except Exception as e:
......
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