Commit a0048db7 by devttys0

Updated internal extractors to return the proper value indicating success/failure.

parent 10b719be
......@@ -44,7 +44,6 @@
#^ascii cpio archive:cpio:/opt/firmware-mod-kit/uncpio.sh '%e'
#^bff volume entry:bff:/opt/firmware-mod-kit/src/bff/bffxtractor.py '%e'
#^wdk file system:wdk:/opt/firmware-mod-kit/src/firmware-tools/unwdk.py '%e'
#^zlib compressed data:zlib:/opt/firmware-mod-kit/src/firmware-tools/unzlib.py '%e'
# Extract, but don't run anything
private key:key
......
......@@ -557,7 +557,7 @@ class Extractor(Module):
try:
if callable(cmd):
try:
cmd(fname)
retval = cmd(fname)
except KeyboardInterrupt as e:
raise e
except Exception as e:
......
......@@ -20,7 +20,6 @@ class ZLIBExtractPlugin(binwalk.core.plugin.Plugin):
def extractor(self, fname):
outfile = os.path.splitext(fname)[0]
#print ("Extracting from '%s' to '%s'" % (fname, outfile))
try:
fpin = binwalk.core.common.BlockFile(fname)
......@@ -32,6 +31,6 @@ class ZLIBExtractPlugin(binwalk.core.plugin.Plugin):
fpin.close()
fpout.close()
except Exception, e:
pass
#print ("Failed to decompress data:", str(e))
return False
return True
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