관리-도구
편집 파일: cln.cpython-311.pyc
� IMg�/ � �� � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl m Z d dlmZ d dl mZ d dlmZmZmZmZmZ d dlZd dlmZ d dlmZ d dlmZmZmZ d d lmZ d Z ed� � Z ej! e"� � Z#dZ$ ed �� � de%fd�� � Z&d� Z' G d� de(� � Z) G d� de(� � Z* G d� de)� � Z+dd�Z, G d� d� � Z- G d� d� � Z.d� Z/dS )� N)�defaultdict)� lru_cache)�Path)� parse_qsl� urlencode�urljoin�urlparse� urlunparse)�ANTIVIRUS_MODE)� LicenseCLN)� CheckRunError�async_lru_cache� check_run)�get_hostnamei, z/usr/sbin/ie-configzpwget -qq -O - https://repo.imunify360.cloudlinux.com/defence360/imunifyemail-deploy.sh | bash -s 'is-supported'� )�maxsize�returnc � �� K � t t d�� � � d {V �� nM# t $ r@} | j dk r*t � dt | � � � �� � Y d } ~ dS d } ~ ww xY wdS )NT)�shell�d zimunify-email check failed F)r �IE_SUPPORTED_CMDr � returncode�logger�error�str)�es �R/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/internals/cln.py�is_imunify_email_supportedr s� � � � ���(��5�5�5�5�5�5�5�5�5�5�5��� � � ��<�3����L�L�?�s�1�v�v�?�?�@�@�@��u�u�u�u�u��������� �4s �! � A+�5A&�&A+c � �� K � t rdS t � � � sdS t t t � � dg� � � d{V ��} n# t $ r Y dS w xY wd| � � � v S )zTry to get imunify-email statusF�statusNz&spamfilter exim configuration: enabled)r � _IMUNIFY_EMAIL_CONFIG_EXECUTABLE�existsr r r �decode)�outputs r �get_imunify_email_statusr% * s� � � � �� ��u�+�2�2�4�4� ��u�� � �1� 2� 2�H�=� � � � � � � � ���� � � � ��u�u�����3�v�}�}���F�Fs �)A � A �A c � � e Zd Zdd�Zd� ZdS )�CLNErrorNc �"