Commit a0048db7 by devttys0

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

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