관리-도구
편집 파일: 009_revisium_scan_history.cpython-311.pyc
� ��g�# � �$ � d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl mZ ddlm Z ddlmZ ddlmZ dd lmZ dd lmZ ddlmZmZmZmZ ddlmZmZmZ ej e � � Z! G d � d� � Z" ed�� � G d� d� � � � Z#dede$fd�Z% G d� d� � Z& G d� de&� � Z' G d� de&� � Z( G d� de(� � Z)de$fd�Z*de$fd �Z+d!e,fd"�Z-d#e,d$e$fd%�Z.d&efd'�Z/ed*d(�� � Z0ed*d)�� � Z1dS )+uQ 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> Migrate scan/cleanup/restore history from revisium extension for Plesk� N)�abstractmethod)�defaultdict)� dataclass)�iglob)�Path)�uuid4)�file_hash_and_size)�CleanupStorage)�find_revisium_db�get_domain_docroot�get_revisium_db�get_vhosts_dir)�batched� get_owner�skip_for_im360c �F � e Zd ZdZdZdZed� � � Zed� � � ZdS )�dbNc �r � |j d | _ |j d | _ |j d | _ d S )N� malware_scans�malware_hits�malware_history)�orm�MalwareScan� MalwareHit�MalwareHistory)�cls�migrators �^/opt/imunify360/venv/lib/python3.11/site-packages/imav/migrations/009_revisium_scan_history.py�initzdb.init6 s4 � �"�,��7���!��n�5���%�\�*;�<����� c � � t |d�� � D ]6}|� t |� � � � � � � �7d S )Ni� )�n)r �insert_many�list�execute)r �model�data�batchs r r# zdb.insert_many<