6)2A 9 d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ ej ej ej ej ej fZ d
d
Z G d de
Zd S )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
) HookEvent)MessageType)expect)
execute_hooks)EventHookExecutor)MalwareHitStatus)
MalwareHitNc
K t j |d \ }}|r9t j |||||||| } | | d {V d S d S )NT)
by_scan_idignore_cleaned)scan_id scan_typeerrorstartedpathtotal_filestotal_maliciousDUMP)r malicious_listr MalwareDetectedCriticalprocess_message)
sinkr
r r r totalr r hitsmalware_detecteds
U/opt/imunify360/venv/lib/python3.11/site-packages/imav/plugins/event_hook_executor.py
detected_hookr ) s '54 OT 5$<+
""#3444444444445 5 c e Zd Z ee d Z eej d Z eej d Z
eej d ZdS )ImavEventHookExecutorc X K | j t | d S N)_loopcreate_taskr )selfevents r
receive_eventz#ImavEventHookExecutor.receive_event> s*
}U3344444r c ( K |d }|rdnd}|d }d |D }d |D }t j |d |d |t | t | || }| j | d {V d S )
Nr failedokr c 8 g | ]}|j t j v |S )statusr
RESTORABLE).0hs r
zAImavEventHookExecutor.process_malware_cleanup..H s( NNNah2B2M&M&M1&M&M&Mr c 6 g | ]}| S r, )as_dict)r/ hits r r1 zAImavEventHookExecutor.process_malware_cleanup..I s ...#
...r
cleanup_idr )r5 r r r
total_cleanedr- r )r MalwareCleanupFinishedlen_sinkr )r% messager r- r cleaneddumpmalware_cleanups r process_malware_cleanupz-ImavEventHookExecutor.process_malware_cleanupB s ",vNNdNNN.....#:|,I&D g,,
j((99999999999r c
K |d }| d sd S t | j |d |d |d |d |d |d d {V d S )Nsummaryr scanidtyper r r )getr r9 )r% r: r@ s r process_malware_scanz*ImavEventHookExecutor.process_malware_scanV s )$
{{6"" FJHFOIFOM"G
r c K t | j |j |j |j |j |j |j d {V d S r" )r r9 r
rB r r total_resourcesr )r% r: s r process_malware_db_scanz-ImavEventHookExecutor.process_malware_db_scanj sd JOLOL#M
r N)
__name__
__module____qualname__r EVENTSr' r MalwareCleanupr> MalwareScanrD MalwareDatabaseScanrG r, r r r r = s VV_5 5 _5 VK&'': : (':&