관리-도구
편집 파일: determine_hosting_panel.cpython-311.opt-1.pyc
� IMg � � � d Z ddlZddlmZ ddlmZ dZdZdZdZ ej e� � Zd e fd �Zd� Zd� Zd � Zd� Zd� ZdS )zg Determines hosting panel. This module has minimal dependencies and only imports required panel class. � N)� import_module)�Pathz/usr/local/cpanel/cpanelz"/usr/local/directadmin/directadminz/usr/sbin/pleskz*/etc/sysconfig/imunify360/integration.conf�root_modulec �F � t � � r&t | � d�� � }|� � � S t � � r&t | � d�� � }|� � � S t � � r&t | � d�� � }|� � � S t � � r&t | � d�� � }|� � � S | dk r&t | � d�� � }|� � � S t | � d�� � }|� � � S )Nz.subsys.panels.generic.panelz.subsys.panels.plesk.panelz.subsys.panels.cpanel.panelz .subsys.panels.directadmin.panel�defence360agentz.subsys.panels.no_cp.panel)�is_generic_panel_installedr �GenericPanel�is_plesk_installed�Plesk�is_cpanel_installed�cPanel�is_directadmin_installed�DirectAdmin�NoCP�NoControlPanel)r �modules �h/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/application/determine_hosting_panel.py�get_hosting_panelr s5 � � "�#�#� � �+�K�K�K�L�L���"�"�$�$�$� � � � ��+�I�I�I�J�J���|�|�~�~�� � � � ��+�J�J�J�K�K���}�}���� !� #� #� ���<�<�<� � �� �!�!�#�#�#� �)� )� )��+�I�I�I�J�J���{�{�}�}�� �k�E�E�E� F� F�F�� � �"�"�"� c �* � t t � � S �N)�_is_panel_installed�CPANEL_FILE� r r r r 3 s � ��{�+�+�+r c �* � t t � � S r )r �DA_FILEr r r r r 7 � � ��w�'�'�'r c �* � t t � � S r )r �GP_FILEr r r r r ; r r c �* � t t � � S r )r � PLESK_FILEr r r r r ? s � ��z�*�*�*r c �D � t | � � � � � S r )r �is_file)� panel_files r r r C s � �� ���#�#�%�%�%r )�__doc__�logging� importlibr �pathlibr r r r! r � getLogger�__name__�logger�strr r r r r r r r r �<module>r- s� ��� � ���� #� #� #� #� #� #� � � � � � �(�� .�� � � 6�� �� �8� $� $��#�3� #� #� #� #�D,� ,� ,�(� (� (�(� (� (�+� +� +�&� &� &� &� &r