File manager - Edit - /opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/scan/mds/__pycache__/cleaner.cpython-311.opt-1.pyc
Back
� ,|_j] � � � d Z ddlZddlZddlZddlmZ ddlmZmZm Z ddl mZ ddlm Z ddlmZ ddlmZ ej e� � Z G d � d � � ZdS )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)�suppress)�Malware�MalwareScanIntensity�MalwareSignatures)�MDS_PATH)�MDSDetachedCleanupDir)�storage_path)� get_memoryc �F � e Zd Zd� Zed� � � Zed� � � Zd� ZdS )�MalwareDatabaseCleanerc � � |st d� � �|st d� � �|| _ || _ || _ t | j � � | _ d S )Nz'Cannot instantiate cleaner without pathz,Cannot instantiate cleaner without app names)� ValueError� cleanup_id�path�app_namer �work_dir)�selfr r r s �U/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/scan/mds/cleaner.py�__init__zMalwareDatabaseCleaner.__init__) s\ � �� H��F�G�G�G�� M��K�L�L�L�$����� � �� �-�d�o�>�>�� � � � c �6 � t | j | j � � S )N)r r r �r s r r z#MalwareDatabaseCleaner.storage_path3 s � ��D�I�t�}�5�5�5r c �F � dt dd| j dt j dt | j j � � d| j dt | j j � � d| j d | j d t j dt t j � � dt t j � � gS ) Nz/opt/ai-bolit/wrapperz--cleanz--pathz--avdbz --report-filez --detachedz --progressz --backup-filez --app-namez --procudbz--memoryz--db-timeout)r r r �MDS_AI_BOLIT_HOSTER�strr �report_filer � progress_filer r �MDS_PROCU_DBr r �RAMr �MDS_DB_TIMEOUTr s r �cmdzMalwareDatabaseCleaner.cmd7 s� � � $�����I���1���� �)�*�*���O���� �+�,�,������M���*���+�/�0�0����&�'�'�/ � r c � �V K � | j 5 | j j � d�� � 5 }| j j � d�� � 5 }t � d| j � � t t � � 5 t j | j � � d d d � � n# 1 swxY w Y t j | j d||t | j � � d��� d {V �� d d d � � n# 1 swxY w Y d d d � � n# 1 swxY w Y d d d � � d S # 1 swxY w Y d S )N�w)�modezRunning MDS Cleaner with: %sT)�start_new_session�stdout�stderr�cwd)r �log_file�open�err_file�logger�infor! r �FileNotFoundError�os�unlinkr �asyncio�create_subprocess_execr )r �l_f�e_fs r �startzMalwareDatabaseCleaner.startS s9 � � � � �]� � ���'�,�,�� -� � � ��d�m�,�1�1�s�1�;�;� �?B����:�D�H�E�E�E��/�0�0� 1� 1��I�d�/�0�0�0�1� 1� 1� 1� 1� 1� 1� 1� 1� 1� 1���� 1� 1� 1� 1� �4��X�&*����D�M�*�*�� � � � � � � � � � � � � � � � � � � � ���� � � � � � � � � � � � � � � ���� � � � � � � � � � � � � � � � ���� � � � � � s| �!D�!D�5C/�B' �C/�'B+ �+C/�.B+ �/4C/�#D�/C3�3D�6C3�7D�:D�D � D� D �D�D"�%D"N)�__name__� __module__�__qualname__r �propertyr r! r5 � r r r r ( sh � � � � � �?� ?� ?� �6� 6� �X�6� � � � �X� �6� � � � r r )�__doc__r1 �loggingr/ � contextlibr � defence360agent.contracts.configr r r �imav.malwarelib.scan.mdsr �!imav.malwarelib.scan.mds.detachedr � imav.malwarelib.scan.mds.restorer �imav.malwarelib.utilsr � getLoggerr6 r, r r: r r �<module>rD s� ��� �* ���� ���� � � � � � � � � � �� � � � � � � � � � .� -� -� -� -� -� C� C� C� C� C� C� 9� 9� 9� 9� 9� 9� ,� ,� ,� ,� ,� ,� �� �8� $� $��;� ;� ;� ;� ;� ;� ;� ;� ;� ;r
| ver. 1.4 |
Github
|
.
| PHP 8.2.32 | Generation time: 0.06 |
proxy
|
phpinfo
|
Settings