modules.processing.buffer

Package modules :: Package processing :: Module buffer |
[hide private]
[frames] | no frames]

# Source Code for Module modules.processing.buffer

     1  # Copyright (C) 2010-2013 Claudio Guarnieri.
     2  # Copyright (C) 2014-2016 Cuckoo Foundation.
     3  # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
     4  # See the file 'docs/LICENSE' for copying permission.
     5
     6  import os
     7
     8  from lib.cuckoo.common.abstracts import Processing
     9  from lib.cuckoo.common.objects import File
    10
    11 -class DroppedBuffer(Processing):
    12      """Dropped buffer analysis."""
    13
    14 -    def run(self):
    15          """Run analysis.
    16          @return: list of dropped files with related information.
    17          """
    18          self.key = "buffer"
    19          dropped_files = []
    20
    21          for dir_name, dir_names, file_names in os.walk(self.buffer_path):
    22              for file_name in file_names:
    23                  file_path = os.path.join(dir_name, file_name)
    24                  file_info = File(file_path=file_path).get_all()
    25                  dropped_files.append(file_info)
    26
    27          return dropped_files
    28