관리-도구
편집 파일: submit.cpython-311.pyc
� ������"3@���������������������h�����d�Z�ddlZddlZddlmZ�ddlmZ��ej��������e������������Z dZ dZd d�Zd��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)�malware_response)�LicenseError�fp�fnc����������������������K����|t�����������k����rt����������j���������nt����������j��������} �t����������j��������|�|���������������d{V����dS�#�t����������j��������$�r'}t �������������������������������d|�|�������������Y�d}~dS�d}~ww�xY�w)a�� Submit file to MRS for analysis :param filename: str -> path to file to submit :param type: str -> report type (fp or fn) :param scanner: int -> scanner id :param reason: str -> malware name provided by scanner :raises LicenseError: )� upload_reasonNzFile %s uploading failed. %s.)�FALSE_POSITIVEr����FALSE_NEGATIVE�upload_with_retries�ClientError�logger�error)�filename�type�reasonr����es��� �Q/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/utils/submit.py�submit_malwarer���"���s�������������>�!�!�� �'�'� � ,��� C��2��M� �� �� �� �� �� �� �� �� �� �� �� ����'��C��C��C����4�h��B�B�B�B�B�B�B�B�B�����C���s����A��A;�A6�6A;c������������������������d��}t����������j����������������������}|���������������������t����������|�i�|��������������}|���������������������|�������������d�S�)Nc������������������������|�������������������������������������}t����������|t����������������������r)t�������������������������������t����������|�������������������������d�S�|�t��������������������������������d|��������������d�S�d�S�)NzFile submission failed)�exc_info)� exception� isinstancer���r ����warning�str)�futurer���s��� r����report_errorz*submit_in_background.<locals>.report_error:���sp�������������a��&�&�� C��N�N�3�q�6�6�"�"�"�"�"� �]����5���B�B�B�B�B���]�����)�asyncio�get_event_loop�create_taskr����add_done_callback)�args�kwargsr����loop�tasks��� r����submit_in_backgroundr'���9���s^������C��C��C���!�#�#�D����N�D�;�F�;�;�<�<�D����<�(�(�(�(�(r���)N)�__doc__r����logging�imav.malwarelib.utilsr����!defence360agent.contracts.licenser���� getLogger�__name__r ���r ���r ���r���r'�����r���r����<module>r/������s���������*�����������2��2��2��2��2��2��:��:��:��:��:��:� �� �8� $� $������C��C��C��C�. )�� )�� )�� )�� )r���