Hacked By AnonymousFox

Current Path : /opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/utils/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/utils/__pycache__/submit.cpython-311.pyc

�

��gk��h�dZddlZddlZddlmZddlmZeje��Z	dZ
dZd	d�Zd�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�|tkrtjntj}	tj||����d{V��dS#tj$r'}t
�d||��Yd}~dSd}~wwxYw)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�}tj��}|�t|i|����}|�|��dS)Nc���|���}t|t��r)t�t|����dS|�t�d|���dSdS)NzFile submission failed)�exc_info)�	exception�
isinstancerr
�warning�str)�futurers  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'9s^��C�C�C��!�#�#�D����N�D�;�F�;�;�<�<�D����<�(�(�(�(�(r)N)�__doc__r�logging�imav.malwarelib.utilsr�!defence360agent.contracts.licenser�	getLogger�__name__r
r	r
rr'�rr�<module>r/s�����*��������2�2�2�2�2�2�:�:�:�:�:�:�	��	�8�	$�	$������C�C�C�C�.
)�
)�
)�
)�
)r

Hacked By AnonymousFox1.0, Coded By AnonymousFox