D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
imunify360
/
venv
/
lib
/
python3.11
/
site-packages
/
im360
/
plugins
/
resident
/
Filename :
file_hooks.py
back
Copy
import asyncio from logging import getLogger from im360 import files from defence360agent.contracts.messages import MessageType from defence360agent.contracts.plugins import MessageSink, expect import im360.subsys.ossec import im360.subsys.webshield import im360.subsys.panels.update_hooks logger = getLogger(__name__) class HooksExecutor(MessageSink): async def create_sink(self, loop): self._loop = loop @expect(MessageType.FilesUpdated, files_type=files.WHITELISTS) async def whitelists_hooks(self, msg): asyncio.create_task( im360.subsys.webshield.update_internal_whitelist( None, is_updated=True ) )