forked from cuckoosandbox/cuckoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuffer.py
More file actions
26 lines (20 loc) · 840 Bytes
/
Copy pathbuffer.py
File metadata and controls
26 lines (20 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright (C) 2010-2015 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import os
from lib.cuckoo.common.abstracts import Processing
from lib.cuckoo.common.objects import File
class DroppedBuffer(Processing):
"""Dropped buffer analysis."""
def run(self):
"""Run analysis.
@return: list of dropped files with related information.
"""
self.key = "buffer"
dropped_files = []
for dir_name, dir_names, file_names in os.walk(self.buffer_path):
for file_name in file_names:
file_path = os.path.join(dir_name, file_name)
file_info = File(file_path=file_path).get_all()
dropped_files.append(file_info)
return dropped_files