관리-도구
편집 파일: 005_plesk_cleanup_storage.cpython-311.pyc
� ��g � � � d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl mZ ddlm Z ddlmZ dd lmZ dd lmZ ddlmZ ddlmZ dd lmZmZ ej e� � ZdZdZdZ de� d�dde � �fZ! ed�� � dee"e"e"f fd�� � Z#de$de$fd�Z%de&de&fd�Z'de&ddfd�Z(d"d�Z)ed#d�� � Z*ed#d �� � Z+ed!k r e)� � dS dS )$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)�iglob)�sha1)�cycle)�Path)�NamedTemporaryFile)�Tuple)�run_coro)�CleanupStorage)�skip_for_im360)�get_all_domains�get_vhosts_dirs IMUNIFYz .revisiumz.imunifyz.revisium_antivirus_cache�*�backup� )�maxsize�returnc �� � t t � � } t t � � � � � � � }| |z }t d| � � t | | � � t | d� � fS )z-Get backup file slices for splitting it apartN)�len�ENCRYPT_KEY� hash_func� hexdigest�slice)�key_size�digest_size� meta_sizes �^/opt/imunify360/venv/lib/python3.11/site-packages/imav/migrations/005_plesk_cleanup_storage.py�_get_backup_file_slicesr 3 ss � � �;���H��i�k�k�+�+�-�-�.�.�K��;�&�I� �d�Y�J��� �y�j�;�,�'�'� �{�l�D�!�!� � � � encryptedc �Z � t d� t | t t � � � � D � � � � }t � � \ }}}|| }|| }|| }|t k sJ �t |� � � � � |� d� � k sJ �|S )z'Decrypt ex-Revisium backup file contentc 3 �&