yZn6 d Z ddlZddlZddlZddlmZ ddlZddlmZ ddl m
Z
ddlmZ ddl
mZ ddlmZmZ dd lmZ dd
lmZ ej e Z G d de 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)Path) ExitStack)utils)Core)MessageType)MessageSinkexpect)Scope)malware_responsec X e Zd Zej ZdZd Z ee j
d ZdS )ServerPullFileSenderNc K || _ d S )N)loop)selfr s M/opt/imunify360/venv/lib/python3.11/site-packages/imav/plugins/server_pull.pycreate_sinkz ServerPullFileSender.create_sink+ s c n K |d }|d D ]} t 5 }t j | r| t j t j }| t j dd|g d {V | d t j |j | }t! j t% |j }t* d|j | t j || d {V d d d n# 1 swxY w Y c# t0 $ r2}t* t5 | Y d }~d }~ww xY wd S ) Nreasonfiles)dirlsz-alr z)Uploading temporary file %s with hash: %s)
upload_reason)r ospathisdir
enter_contexttempfileNamedTemporaryFiler TMPDIRwriter check_runseekr MalwareHitPathnamehashlibsha256r
read_bytes hexdigestloggerinfoupload_file Exceptionwarningstr)r messager filestacktfhash_es r upload_filesz!ServerPullFileSender.upload_files. s "G$ ' 'D
'[[ Ew}}T** "00$7DKHHH ueT7J'K'K!K!K!K!K!K!KLLL
/>rwMM ' MM4466! !#)++ GG!
+6F # (
'
'
's1vv&&&&&&&&
'- ' 's; E6D8E)E6)E- -E60E- 1E66
F2 'F--F2)__name__
__module____qualname__r
IM360SCOPEr r r r MalwareSendFilesr6 r r r
r
' sX KED VK())' ' *)' ' 'r r
)__doc__r&