OwlCyberSecurity - MANAGER
Edit File: revisium.cpython-311.pyc
� N�6h� � � � d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl mZ ddlm Z ddlmZ ddlmZ G d � d e � � Z G d� de � � Z G d � de � � Z G d� d� � Z G d� de� � Z G d� de� � 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)�IntEnum)�Path)�Optional)�Core)� snake_casec �* � e Zd ZdZdZdZdZdZdZdZ dS ) �DeletionTyper � � � � � � N) �__name__� __module__�__qualname__�INJECTION_REMOVED�REMOVED_BY_INJECTION_SIGNATURE�REMOVED_BY_SA_DELF_SIGNATURE�REMOVED_BY_SA_ODFL_SIGNATURE�REMOVED_BY_CAS_SIGNATURE�REMOVED_ELF� PATCH_APPLIED� � �S/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/utils/revisium.pyr r $ s6 � � � � � ���%&�"�#$� �#$� � ���K��M�M�Mr r c �* � e Zd ZdZdZdZdZdZdZdZ dS ) � ErrorTyper r r r � � r N) r r r �NO_ERROR�FILE_TOO_BIG�FILE_READING_ERROR�FILE_NONE_WRITE� NOT_CLEANEDUP�FILE_NOT_EXISTS�FILE_MATCHED_NOT_CLEANEDr r r r r . s5 � � � � � ��H��L����O��M��O� ���r r c � � e Zd ZdZdZdZdS )�RescanResultTyper r r N)r r r �CLEAN�DETECTED�REQUIRED_ADVANCED_SIGNATURESr r r r* r* 8 s � � � � � � �E��H�#$� � � r r* c �R � e Zd ZdZdd�Zd� Zd� Zed� � � Zed� � � Z dS ) �RevisiumTempFile�txtNc �r � |�t t j � � nt |� � | _ || _ d S �N)r r �TMPDIR�tempdir�mode)�selfr4 r5 s r �__init__zRevisiumTempFile.__init__A s- � �,3�O�t�D�K�(�(�(��g������� � � r c �$ � d| j t t j � � dz � � | j fz }| j |z | _ | j rF| j � � � t j t | j � � | j �� � | S )Nz%s_%d.%sg �cA)r5 )�name�int�time�extr4 �_pathr5 �touch�os�chmod�str)r6 �filenames r � __enter__zRevisiumTempFile.__enter__E sz � ����C�� ���d�0B�,C�,C�T�X� N�N���\�H�,�� ��9� 6��J�������H�S���_�_�4�9�5�5�5�5��r c � � t t � � 5 | j � � � d d d � � d S # 1 swxY w Y d S r2 )r �FileNotFoundErrorr= �unlink)r6 �_s r �__exit__zRevisiumTempFile.__exit__M s� � � �'� (� (� � ��J������ � � � � � � � � � � � ���� � � � � � s �<�A �A c �* � t | j � � S r2 )rA r= �r6 s r rB zRevisiumTempFile.filenameQ s � ��4�:���r c �4 � t | j j � � S r2 )r � __class__r rJ s r r9 zRevisiumTempFile.nameU s � ��$�.�1�2�2�2r )NN) r r r r<