ok

Mini Shell

Direktori : /opt/imunify360/venv/lib/python3.11/site-packages/imav/internals/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/imav/internals/__pycache__/im360.cpython-311.pyc

�

G��f=���dZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ee��ZdZed	��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 <https://www.gnu.org/licenses/>.

Copyright © 2019 Cloud Linux Software Inc.

This software is also available under ImunifyAV commercial license,
see <https://www.imunify360.com/legal/eula>
�N)�Path)�	getLogger)�
LicenseCLN)�cPanel)�HostingPanelz?https://repo.imunify360.cloudlinux.com/defence360/i360deploy.shz!/var/imunify360/tmp/i360deploy.shc���K�t��}tj��}|�d��dks|jt
jkrdS	t���s�tj�	dd���tj�td���5}|���}t�|��ddd��n#1swxYwYt�d	��t#jd
tddgd�
��n3#t&$r&}t(�d|��Yd}~dSd}~wwxYwdS)z6
    Deploys imunify360 for CPanel installations.
    �status�okFT)�parents�exist_ok�
)�timeoutNi�z!/usr/libexec/report-command-error�IPLz-y)�start_new_sessionz#Failed to upgrade to imunify360: %r)rr�	get_token�get�NAMEr�TARGET_PATH�exists�parent�mkdir�urllib�request�urlopen�
SOURCE_URL�read�write_bytes�chmod�
subprocess�Popen�	Exception�logger�error)�hp�
license_token�response�content�es     �I/opt/imunify360/venv/lib/python3.11/site-packages/imav/internals/im360.py�deploy_im360r*%s�����
���B��(�*�*�M�����"�"�d�*�*�b�g���.D�.D��u���!�!�#�#�	1���$�$�T�D�$�A�A�A���'�'�
�B�'�?�?�
1�8�"�-�-�/�/���'�'��0�0�0�
1�
1�
1�
1�
1�
1�
1�
1�
1�
1�
1����
1�
1�
1�
1�	���%� � � �	��
0�+�u�d�K�"�	
�	
�	
�	
�	
���������:�A�>�>�>��u�u�u�u�u����������4s=�A D5�5/C0�$D5�0C4�4D5�7C4�8<D5�5
E%�?E � E%)�__doc__r�urllib.requestr�pathlibr�loggingr�!defence360agent.contracts.licenser�$defence360agent.subsys.panels.cpanelr�+defence360agent.subsys.panels.hosting_panelr�__name__r"rrr*��r)�<module>r5s�����*��������������������8�8�8�8�8�8�7�7�7�7�7�7�D�D�D�D�D�D�
��8�	�	��
N�
��d�6�7�7������r4

Zerion Mini Shell 1.0