0x1998 - MANAGER
Düzenlenen Dosya: proactive.cpython-311.pyc
� �·i� � �� � d dl Z d dlZd dlZd dlmZ d dlZd dlmZmZm Z d dl mZ d dlm Z ej e� � ZdZ ed� � ZdZd Zd ZdZdZd � Zd� Zd� Zd� Zd� ZdS )� N)�Path)�atomic_rewrite� check_run� CheckRunError)�files)�ProactiveDefencez'/usr/share/i360-php-opts/autorules.yamlz/usr/share/i360-php-optsz2/usr/share/i360-php-opts/phpimunity.compiled.rulesz/usr/bin/i360-storage-mkcustomz/usr/bin/i360-storage-newz#/usr/bin/i360-storage-replacehdb-v2� c � �P K � t j t j d�� � } t d� | � � � D � � � � }n+# t $ r t � d� � Y d S w xY w| � |d � � }t dz }t j |dd� � � 5 }t |d � � 5 }t j ||� � d d d � � n# 1 swxY w Y d d d � � n# 1 swxY w Y t j |t � � d S )NF)�integrity_checkc 3 �2 K � | ]}|d dk �|V � �dS )�namezautorules_opt.yaml.gzN� )�.0�is �K/opt/imunify360/venv/lib/python3.11/site-packages/im360/subsys/proactive.py� <genexpr>z,update_php_immunity_files.<locals>.<genexpr> s: � � � � � ���&� �5L�(L�(L�A�(L�(L�(L�(L� � � z)PHP Immunity rules are not found in index�urlz.tmp�rtzutf-8)�encoding�w)r �Index�PHP_IMMUNITY�next�items� StopIteration�logger�warning� localfilepath�PHP_IMMUNITY_FILENAME�gzip�open�shutil�copyfileobj�os�rename)�index�item� local_path�tmp�src�dsts r �update_php_immunity_filesr- s� � � � ��K��*�E�B�B�B�E��� � ��{�{�}�}� � � � � ���� � � � ����B�C�C�C�������� �$�$�T�%�[�1�1�J� �&� (�C� ��:�t�g� 6� 6� 6� %�#�t��S�@� @� %� ���3��$�$�$�%� %� %� %� %� %� %� %� %� %� %���� %� %� %� %� %� %� %� %� %� %� %� %� %� %� %���� %� %� %� %� �I�c�(�)�)�)�)�)sG �+A �$A8�7A8�7D�C*�D�*C. �.D�1C. �2D�D�Dc � � K � t t t g� � � d {V �� d S # t $ r&} t � d| � � Y d } ~ d S d } ~ wt $ r&} t � d| � � Y d } ~ d S d } ~ ww xY w)Nzi360-storage is not found: %sz*Failed to apply new php immunity rules: %s)r �I360_STORAGE_BINr �FileNotFoundErrorr �errorr )�errs r �apply_php_immunity_rulesr3 + s� � � � �H��)�+@�A�B�B�B�B�B�B�B�B�B�B�B��� ;� ;� ;����4�c�:�:�:�:�:�:�:�:�:������ H� H� H����A�3�G�G�G�G�G�G�G�G�G�����H���s �!'