Edit File: wordpress.cpython-311.opt-1.pyc
� ���h�0 � � � d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m Z ddlmZ ddl mZmZmZ ddlmZ dd lmZmZmZ dd lmZmZ ddlmZ ddlmZ dd lmZ ddl m!Z! ddl"m#Z# ddl$m%Z% ddl&m'Z' ddl(m)Z)m*Z* ej+ e,� � Z- edej. � � Z/ ed� � Z0 ed� � Z1e0dz Z2e0dz Z3 G d� dee� � Z4dS )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)�Path)� HookEvent)�ANTIVIRUS_MODE�SystemConfig)�MessageType)�MessageSink� MessageSource�expect)� hosting_panel)� load_state� save_state�register_lock_file)�Scope�recurring_check)� check_lock)�DAY)�plugin)� Wordpress)� MalwareHit��WPSite)�get_sites_by_path)�is_secret_expired� rotate_secretzwp-gen-authz-/etc/sysconfig/imunify360/imunify360.config.dzF/opt/imunify360/venv/share/imunify360/11_on_first_install_wp_av.configz 11_on_first_install_wp_av.configz.11_on_first_install_wp_av.flagc �F � e Zd Zej Zd� Zd� Zd� Zd� Z d� Z d� Zdd�Zd � Z eed ee�� � d� � � Z eej � � d � � � Z eej � � d� � � Z eej � � d� � � Z eej � � d� � � ZdS )�ImunifySecurityPluginc �� � d | _ d | _ t d� � � d� � | _ t d� � � d� � pt j | _ d | _ d | _ d S )Nr � installed�enabled) �_loop�_sinkr �get�installation_completedr �SECURITY_PLUGIN_ENABLED�last_config_value�installation_task� deleting_task��selfs �K/opt/imunify360/venv/lib/python3.11/site-packages/imav/plugins/wordpress.py�__init__zImunifySecurityPlugin.__init__F s{ � ��� ��� �&0�1H�&I�&I�&M�&M��' � ' ��#� �.�/�/�3�3�I�>�>� 1��0� �� 7;���26����� c � � K � d S �N� )r) �loops r* �create_sinkz!ImunifySecurityPlugin.create_sinkS s � � � ��r, c � � K � || _ || _ | j � | � � � � � | _ t r| � � � � d {V �� d S t � d�� � d S )NT)� missing_ok) r r! �create_task�refresh_auth_files�_update_auth_taskr �_apply_first_install_config�FIRST_INSTALL_FLAG�unlink)r) r0 �sinks r* � create_sourcez#ImunifySecurityPlugin.create_sourceV s� � � � ��� ��� �!%��!7�!7��#�#�%�%�" � " ��� � 7��2�2�4�4�4�4�4�4�4�4�4�4�4��%�%��%�6�6�6�6�6r, c � �f K � t � � � sd S t j � � � � � � d {V ��dk rKt � t � � � � � }t � d� � t � � � d S )N� i� )r8 �existsr �HostingPanel�users_count�FIRST_INSTALL_CONFIG_PATH� write_text�FIRST_INSTALL_CONFIG_FILE� read_text�chmodr9 )r) �_s r* r7 z1ImunifySecurityPlugin._apply_first_install_configa s� � � � �!�(�(�*�*� ��F��+�-�-�9�9�;�;�;�;�;�;�;�;�q�@�@�)�4�4�)�3�3�5�5�� �A� &�+�+�E�2�2�2��!�!�#�#�#�#�#r, c � �V K � | j � � � | j � d {V �� d S r. )r6 �cancelr( s r* �shutdownzImunifySecurityPlugin.shutdownk s<