관리-도구
편집 파일: wordpress_mu_plugin.cpython-311.pyc
� IMg� � �~ � d dl Z d dlZd dlmc mZ d dlmZ ee� � ZdZ dZ e e gZdZd� Z G d� d� � ZdS ) � N)� getLogger�mu_plugin_installation�advice_email_notification�!/usr/sbin/cloudlinux-xray-managerc �4 � t j d� � }|� d� � D ]B}|� d� � j | k r"|� d� � d j c S �Cn)# t t t t j f$ r Y d S w xY wd S )Nz/etc/sysconfig/rhn/systemid�member�name�valuer ) �etree�parse�iter�find�text�IOError� IndexError�KeyError� ParseError)r �rhn_systemid_xmlr s �^/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/utils/wordpress_mu_plugin.py� get_rhn_valuer s� � �� �;�'D�E�E��&�+�+�H�5�5� 4� 4�F��{�{�6�"�"�'�4�/�/��{�{�7�+�+�A�.�3�3�3�3� 0� 4�� �Z��5�+;�<� � � ��t�t������4s �A*A/ �-A/ �/"B�Bc �* � e Zd Zed� � � Zd� ZdS )�WordPressMuPluginc �� � t d� � } | rWt j ddd| � dd� � gdd�� � }t � d |j |j � � d S d S ) N� system_idr zenable-user-agentz--system_idzID-� T)�capture_outputr z1Activation xray manager captured out: %s, err: %s)r � subprocess�run�replace�logger�info�stdout�stderr)r �procs r �_setup_agentzWordPressMuPlugin._setup_agent s� � �!�+�.�.� �� ��>�7�'�!��%�%�e�R�0�0� � $�� � � �D� �K�K�C����� � � � � � � � c � � t |dk |g� � s8t � dt |� � t |� � � � dS |s*t � dt |� � � � dS t j � t � � st d� � �| � � � dS )z� Must use plugin works only if xray-user-agent is running So it is a requirement to be sure it is turned on It is expected to be turned on by default after conversion to Cloulinux Pro edition �activeznNothing to prepare for Must Use plugin as settings are not turned on, activation status=%s mu_plugin_status=%sNz=Nothing to prepare for Must Use plugin as mu_plugin_status=%szXalt-php-xray rpm package is not installed in the system, please install it and try again) �allr �warning�str�os�path�exists�XRAY_MANAGER� ValueErrorr% )�self�activation_status�mu_plugin_statuss r �"prepare_for_mu_plugin_installationz4WordPressMuPlugin.prepare_for_mu_plugin_installation. s� � � �%��1�3C�D�E�E� ��N�N�N��%�&�&��$�%�%� � � � �F�� ��N�N�)��$�%�%� � � � �F��w�~�~�l�+�+� ��A�� � � �������r&