ok
Direktori : /opt/imunify360/venv/lib/python3.11/site-packages/im360/plugins/resident/ |
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/im360/plugins/resident/file_hooks.py |
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 ) )