hdZddlZddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl m Z d \ZZZZd d d eeeed ZeeeehZedgdZde fdZddZdS)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) namedtuple)suppress)Path)time)AIBOLIT) suspiciousvulnerszextended-suspiciouszignored-suspicious php_malware js_malware cloudhash)pjcsvesisAiBolitCSVReport) sectionpath signaturectimemtimesizeetime signature_idhashsignature_namesha256 report_pathc #dK|d5}tj|dD]e}t|} t|j}n#t $rY,wxYw|jpd||j }|jdkr!tt|j ntt}|j}tt j5t%j|d}dddn #1swxYwYt)j|}t,||t|jt|j|t2vt|jpd |jp|jpd||t:kd Vg ddddS#1swxYwYdS) N)newline,) delimiterz{}.{}rTvalidater) name file_namerrmodification_timer rr timestampextended_suspicious)opencsvreaderrSECTIONSrKeyErrorrformatrintfloatrrrrbinasciiErrorbase64 b64decodeosfsdecoderrrSUSPICIOUS_SECTIONSrr rEXTENDED_SUSPICIOUS)r! report_streamraw_rowrowrsigr,r*s Y/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/scan/ai_bolit/report.pyparse_report_csvrCOsQ   "  % %z-3???  G"G,C "3;/    $)))C*-););E#)$$%%%TVV I(.)) G G",YFFF  G G G G G G G G G G G G G G G I..I& SY%(^^%)<<CHM** 6ch6$&'.2E'E      ! sZ#F%AF% AF%AB F%)D  F% D F%D BF%%F),F)Tc#KtD]b}||gD]G}|dp)d|t |dg}|dkr"t t |dnt t}|d}|rGttj 5tj |d}dddn #1swxYwYtj|}t|||t v|d |d |d |d |d ||t"kd VIddS)Nsn.sigidr etfnTr'szctmtr r) r)r*rr rrr+rr,r-)r1valuesgetjoinstrr4r5rrr6r7r8r9r:r;rr<r=)report base64_pathrhitrAr,r*s rBparse_report_jsonrTos??$$::gr**  C''$--I388Wc#g,6G6G,H#I#IC *1I)=)=E#d)$$%%%3tvv;; D I Khn--KK & 0T J J JIKKKKKKKKKKKKKKK I..I& %)<<D T%(Y#''&//::&'.2E'E       sDD D )T)__doc__r8r6r/r: collectionsr contextlibrpathlibrrr#r SUSPICIOUSVULNERSr=IGNORED_SUSPICIOUSr1r<rrCrTrBr^s>*  """"""             :   $$@r]