v2?st d Z ddlZddlZddlZddlZddlmZmZmZm Z m
Z
ddlmZ ddl
mZ ddlmZ ddlmZ dd lmZmZmZmZ ej e Z G d
d ZdS )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)DictIteratorListOptionalTuple)ScanFailedError)Core)MessageType )AiBolit)
DirectAiBolitPrepareFileList
ScanResult
event_hookc e Zd ZddZd Zd Zd Zd Zd Zd Z d
Z
d Zd Zd
Z
dee deeee ee f fdZdS )MalwareScannerNFc |pt j | _ || _ || _ d | _ d | _ t j | _ || _ d | _
d | _ t j | _
d S N)ConfigTMPDIR_tmpdir_sink_hooksaibolit_taskasyncioget_event_loop_loop
_current_task_future_resultLock_is_running)selftmpdirsinkhookss Q/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/scan/scanner.py__init__zMalwareScanner.__init__' sg .
+--
!""<>> c t j | _ | j | j |g|R i | | _ | j S r )r Futurer r create_task_startr )r# pathargskwargss r' startzMalwareScanner.start4 sM %n..Z++KDK,Nt,N,N,Nv,N,NOO
zr) c | j t j d | j | j | j S NzNeed to start action)r r
exceptionsInvalidStateErrorr run_until_completeresultr# s r' waitzMalwareScanner.wait9 sQ &$667MNNN
%%d&9:::"))+++r) c K | j t j d | j d {V | j S r3 )r r r4 r5 r7 r8 s r'
async_waitzMalwareScanner.async_wait@ sW &$667MNNN!!!!!!!!"))+++r) c d | r| j d S d S r )statusr cancelr8 s r' stopzMalwareScanner.stopG s6 ;;== J r) c 4 | j S r )r" lockedr8 s r' r= zMalwareScanner.statusK s &&(((r) c p | j rd S | j | d S r )r done
set_result)r# r7 s r' _try_set_resultzMalwareScanner._try_set_resultN s; ##%% F&&v.....r) c p | j rd S | j | d S r )r rC
set_exception)r# exceptions r' _try_set_exceptionz!MalwareScanner._try_set_exceptionS s; ##%% F)))44444r) c K | j 4 d {V | j }| j r t | j | } ||g|R i | d {V }| | nQ# t j $ r | d Y n+t $ r}| | Y d }~nd }~ww xY wd d d d {V d S # 1 d {V swxY w Y d S r )
r"
_execute_scanr r r rE r CancelledError ExceptionrI )r# r. r/ r0 execute_scanr7 es r' r- zMalwareScanner._startX s # - - - - - - - -
-#1; H#9:dj#9#9,#G#GL+|DB4BBB6BBBBBBBB $$V,,,, )
+
+
+$$T*****
+
+
+''********
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sF C =A%C %$B3 C B3B.)C .B33C
CCc K | j r t j }|j j |d<