MCPcopy Index your code
hub / github.com/OWASP/Python-Honeypot / ContainerFilesHandler

Class ContainerFilesHandler

core/file_monitor.py:28–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27
28class ContainerFilesHandler(FileSystemEventHandler):
29 def __init__(self):
30 self.log_filename = None
31 self.EXCLUDES = None
32 self.module_name = None
33
34 def on_any_event(self, event):
35 if not (event.event_type == 'modified' and event.is_directory) \
36 and not is_excluded(event.src_path, self.EXCLUDES):
37 insert_to_file_change_events_collection(
38 FileEventsData(
39 file_path=byte_to_str(event.src_path),
40 status=byte_to_str(event.event_type),
41 module_name=self.module_name,
42 date=now(),
43 is_directory=event.is_directory
44 )
45 )
46
47
48class FileMonitor:

Callers 1

runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected