OwlCyberSecurity - MANAGER
Edit File: base.cpython-311.pyc
� E�\hXJ � �� � d Z ddlZddlZddlZddlZddlZddlZddlmZ ddlm Z ddl mZmZ ddl mZmZ ddlmZ ddlmZ dd lmZmZ dd lmZmZmZ ddlmZ ddlmZ dd lm Z ddl!m"Z"m#Z#m$Z$ ddl%m&Z& ddl'm(Z(m)Z) ddl*m+Z+m,Z,m-Z-m.Z.m/Z/ ddl0m1Z1m2Z2m3Z3 ddl4m5Z5 ddl6m7Z7m8Z8 ddl9m:Z:m;Z;m<Z< ddl=m>Z> ddl?m@Z@ ddlAmBZC ddlDmEZE ddlFmGZGmHZH ddlImJZJ ddlKmLZLmMZMmNZN ejO eP� � ZQ edg d�d� � � ZR G d!� d"e#� � ZS G d#� d$e"� � ZTd%eUeVeVf fd&�ZW eeeeg� � G d'� d(e"� � � � ZX G d)� d*e#� � ZY G d+� d,e#� � ZZ G d-� d.e#� � Z[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)� namedtuple)�partial)�List�Sequence)�Malware�UserType)�LicenseError)�MessageType)�MS_IGNORE_LIST_EDIT�check_permission)�AV� AV_REPORT�FULL)�feature)�db)�run_in_executor)�CommonEndpoints� RootEndpoints�bind)�run_in_executor_decorator)�validate_av_plus_license�ValidationError)�Scope�does_path_belong_to_user�get_path_owner�is_cloudways�safe_fileops)�MalwareHitStatus�MalwareScanResourceType�MalwareScanType)�CleanupStorage)� DiffError�MalwareHitDiff)�MalwareHistory� MalwareHit�MalwareIgnorePath)� split_args��get_crontab)�QueueSupervisorSync)� MalwareAction)�malware_response� user_list)�MaliciousEndpointStatus)�FALSE_NEGATIVE�FALSE_POSITIVE�submit_malware�IgnoreParameters)�path�app_name�db_host�db_port�db_name)NNNNN)�defaultsc �v � e Zd Zej ZdZ edd� � dd�� � Z edd� � d� � � Z dS ) �SubmitEndpointsu� Warning: This server’s security can be enhanced by enabling the MALWARE_SCANNING.sends_file_for_analysis option. This may minimize the number of undetected malware, making your system more resistant to new threats. The command below can be used to enable the option: imunify-antivirus config update '{"MALWARE_SCANNING": {"sends_file_for_analysis": true}}' - or - imunify360-agent config update '{"MALWARE_SCANNING": {"sends_file_for_analysis": true}}' �submitzfalse-positiveNc � �� K � t |t |�� � � d {V �� d S # t $ r}t |� � �d }~wt $ r# t d� |� � � � �w xY w)N)�reason�File {} doesn't exist.)r1 r0 r r �FileNotFoundError�format)�self�filenamer= �scanner�es �W/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/rpc/endpoints/base.py� submit_fpzSubmitEndpoints.submit_fpp s� � � � � M� ��>�&�I�I�I�I�I�I�I�I�I�I�I�I��� %� %� %�!�!�$�$�$����� � M� M� M�!�":�"A�"A�(�"K�"K�L�L�L� M���s �# � A,�<�0A,zfalse-negativec � �$ K � t |t � � � d {V �� t j st j | j � � S d S # t $ r}t |� � �d }~wt $ r# t d� |� � � � �w xY w)Nr>