OwlCyberSecurity - MANAGER
Edit File: mrs_uploader.cpython-311.pyc
� E�\hd � � � d Z ddlmZ ddlZddlmZmZ ddlmZm Z ddl mZ ddlm Z mZ ddlmZ dd lmZ dd lmZ ddlmZ ddlmZmZmZ dd lmZ ddlmZ e rddl m!Z! ee"e#e!f Z$ ee%� � Z& G d� dee� � 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> � )�annotationsN)�CancelledError�Queue)� ExitStack�suppress)� getLogger)� TYPE_CHECKING�List)� inactivity)�Malware)�LicenseError)�MessageType)�MessageSink� MessageSource�expect)�recurring_check)�malware_response)�MalwareMRSUploadc �� � e Zd ZdZ ej d� � Zd� Zd� Zd� Z d� Z dd �Z ee j � � d � � � Z ed� � d� � � Zdd�Z ee j � � dd�� � ZdS )�MRSUploaderzFailed to submit a filez-(?:suspicious\..+|[CS]MW-SUS-.+|SMW-HEUR-ELF)c �, � t � � | _ d S �N)r � _upload_queue��selfs �Y/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/plugins/mrs_uploader.py�__init__zMRSUploader.__init__6 s � �,1�G�G����� c � �~ K � || _ || _ |� | � � � � � | _ d S r )�_sink�_loop�create_task�upload�_upload_task)r �loop�sinks r � create_sourcezMRSUploader.create_source9 s8 � � � ��� ��� � �,�,�T�[�[�]�]�;�;����r c � � K � d S r � )r r% s r �create_sinkzMRSUploader.create_sink>