관리-도구
편집 파일: plesk_notifications.cpython-311.opt-1.pyc
� ��X0��U�� � � d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ddl mZ ej e � � ZdZd Zg d �Z G d� de� � ZdS ) u This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. Copyright © 2019 Cloud Linux Software Inc. This software is also available under ImunifyAV commercial license, see <https://www.imunify360.com/legal/eula> � N)� lru_cache)�Path)�MessageSink)�HooksConfig)�notifierzE/opt/psa/admin/plib/modules/imunify360/scripts/send-notifications.phpz@/opt/imunify360/venv/share/imunify360/scripts/send-notifications)�CUSTOM_SCAN_MALWARE_FOUND�USER_SCAN_MALWARE_FOUND�REALTIME_MALWARE_FOUNDc �\ � e Zd Zd� Z ed�� � defd�� � Zdefd�Zd� Zd� Z d S ) �PleskNotificationsHooksc � �� K � | � � � r2| � � � s| � � � � d{V �� dS dS | � � � � d{V �� dS )zMessageSink methodN)�is_supported� is_applied� add_hooks�remove_hooks)�self�loops �U/opt/imunify360/venv/lib/python3.11/site-packages/imav/plugins/plesk_notifications.py�create_sinkz#PleskNotificationsHooks.create_sink- s� � � � ������ &��?�?�$�$� '��n�n�&�&�&�&�&�&�&�&�&�&�&� '� '� �#�#�%�%�%�%�%�%�%�%�%�%�%� � )�maxsize�returnc � � t t � � � � � o%t t � � � � � S )N)r �SCRIPT_PATH�exists� HOOK_PATH)r s r r z$PleskNotificationsHooks.is_supported5 s3 � ��K� � �'�'�)�)�F�d�9�o�o�.D�.D�.F�.F�Fr c � � t � � � � � }t d� |� di � � � � � D � � � � S )Nc �P � g | ]#\ }}|t v �t |d d v ��$S )�SCRIPT�scripts)�EVENTSr ��.0�event�rules r � <listcomp>z6PleskNotificationsHooks.is_applied.<locals>.<listcomp><