K6h dZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZeeZd Zed Zd 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) getLogger) LicenseCLN)cPanel) HostingPanel) MalwareTunez?https://repo.imunify360.cloudlinux.com/defence360/i360deploy.shz!/var/imunify360/tmp/i360deploy.shc$KtjrtddSt }t j}|ddks|jtjkrdS t stj ddtjt"d5}|}t|d d d n #1swxYwYtd t+jd td d gdn3#t.$r&}td|Yd }~dSd }~wwxYwdS)z6 Deploys imunify360 for CPanel installations. z8No upgrade flag file exists. Skipping imunify360 upgradeTstatusokF)parentsexist_ok )timeoutNiz!/usr/libexec/report-command-errorIPLz-y)start_new_sessionz#Failed to upgrade to imunify360: %r)rNO_AUTO_UPGRADEloggerwarningrr get_tokengetNAMEr TARGET_PATHexistsparentmkdirurllibrequesturlopen SOURCE_URLread write_byteschmod subprocessPopen Exceptionerror)hp license_tokenresponsecontentes I/opt/imunify360/venv/lib/python3.11/site-packages/imav/internals/im360.py deploy_im360r-&s" F   t B(**M""d**bg.D.Du!!## 1   $ $TD $ A A A'' B'?? 18"--//''000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 %     0+ud K"       :A>>>uuuuu 4s==A E/D EDED r9s*888888777777DDDDDD------ 8   N d677 r8