g=dZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z eeZdZed 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) HostingPanelz?https://repo.imunify360.cloudlinux.com/defence360/i360deploy.shz!/var/imunify360/tmp/i360deploy.shcKt}tj}|ddks|jt jkrdS t st j ddtj td5}|}t |dddn #1swxYwYt d t#jd t d d gd n3#t&$r&}t(d|Yd}~dSd}~wwxYwdS)z6 Deploys imunify360 for CPanel installations. statusokFT)parentsexist_ok )timeoutNiz!/usr/libexec/report-command-errorIPLz-y)start_new_sessionz#Failed to upgrade to imunify360: %r)rr get_tokengetNAMEr TARGET_PATHexistsparentmkdirurllibrequesturlopen SOURCE_URLread write_byteschmod subprocessPopen Exceptionloggererror)hp license_tokenresponsecontentes I/opt/imunify360/venv/lib/python3.11/site-packages/imav/internals/im360.py deploy_im360r*%s 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 D55/C0$ D50C44D57C48r5s*888888777777DDDDDD 8   N d677 r4