Commit d8bd753a by devttys0

Fixed bug in extractor.py's reporting of symlinked files.

parent d739c36c
...@@ -251,10 +251,11 @@ class Extractor(Module): ...@@ -251,10 +251,11 @@ class Extractor(Module):
real_file_path = os.path.realpath(file_path) real_file_path = os.path.realpath(file_path)
self.result(description=file_path, display=False) self.result(description=file_path, display=False)
# Also keep a list of files created by the extraction # Also keep a list of files created by the extraction utility.
# utility # Report the file_path, not the real_file_path, otherwise symlinks will be resolved and
# the same file can end up being listed multiple times if there are symlinks to it.
if real_file_path != dd_file_path: if real_file_path != dd_file_path:
self.output[r.file.path].extracted[r.offset].files.append(real_file_path) self.output[r.file.path].extracted[r.offset].files.append(file_path)
# If recursion was specified, and the file is not the same # If recursion was specified, and the file is not the same
# one we just dd'd # one we just dd'd
......
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