gkhdZddlZddlZddlmZddlmZejeZ dZ dZ d dZ dZ 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 . Copyright © 2019 Cloud Linux Software Inc. This software is also available under ImunifyAV commercial license, see N)malware_response) LicenseErrorfpfncK|tkr tjn tj} tj||d{VdS#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_POSITIVErFALSE_NEGATIVEupload_with_retries ClientErrorloggererror)filenametypereasonres Q/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/utils/submit.pysubmit_malwarer"s > ! ! ''  , C2 M              'CCC 4hBBBBBBBBBCsAA;A66A;cd}tj}|t|i|}||dS)Nc|}t|tr)tt |dS|td|dSdS)NzFile submission failed)exc_info) exception isinstancerr warningstr)futurers r report_errorz*submit_in_background..report_error:sp      a & & C NN3q66 " " " " " ]   5  B B B B B])asyncioget_event_loop create_taskradd_done_callback)argskwargsrlooptasks rsubmit_in_backgroundr'9s^CCC  ! # #D   ND;F;; < r/s*222222::::::  8 $ $CCCC. ) ) ) ) )r