🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-09 13:10:37 | PHP 8.2.33
📂
/ (Root)
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
xray
/
internal
/
__pycache__
📍 /opt/cloudlinux/venv/lib/python3.11/site-packages/xray/internal/__pycache__
🔄 Refresh
✏️
Editing: utils.cpython-311.pyc
Read Only
� 9Mjz � �& � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlZddl Z ddlZddlmc mZ ddlmZ ddlmZmZ ddlmZ ddlmZ ddlmZmZmZmZ ddlm Z m!Z!m"Z" ddl#Z#dd l$m%Z% dd l&m'Z' ddl(m)Z) ddl*m+Z+m,Z,m-Z-m.Z. dd l/m0Z0 ddl1m2Z2 ddl3m4Z4 ddl5m6Z6 ddl7m8Z8 ddl9m:Z; ddl<m=Z=m>Z>m?Z?m@Z@mAZAmBZB ddlCmDZDmEZE ejF d� � ZGeHeIejJ fZKde de fd�ZLde de fd�ZMde de fd�ZNdeOfd�ZPdefd�ZQdeOdefd�ZRdeSfd �ZTd!e!eU deSfd"�ZVd!e!eU deSfd#�ZWdeSfd$�ZXe?fd%eSd&eSddfd'�ZYe?fd&eSdeSfd(�ZZdeSfd)�ZZde"e[ fd*�Z\eNdeSfd+�� � Z]d,eSde"eS fd-�Z^de"eS fd.�Z_d\d/�Z`e@fd0eSde"eS fd1�Za ejb d2� � Zcd3eSddfd4�Zdd3eSd5eedeefd6�Zfd7eSd8eSddfd9�Zgd:eSdd;fd<�Zhd=eOdeOfd>�Zid3eSde"ej fd?�Zkd3eSde"eS fd@�Zld]d3eSddfdA�Zmd3eSde[fdB�Znde[fdC�Zode[fdD�ZpdEe[ddfdF�Zqde[fdG�Zrde[fdH�Zsde[fdI�Ztd,eSde[fdJ�ZudK� Zved^dN�� � Zwed_dPeSdQe[fdR�� � Zxed`dSeOddfdT�� � Zye dadWeOdXeOdSeOddfdY�� � ZzedZ� � � Z{d[� Z|dS )bzB This module contains helpful utility functions for X-Ray Manager � N)�contextmanager)�date� timedelta��wraps)�glob)�socket�fromfd�AF_UNIX�SOCK_STREAM)�Callable�List�Optional)�AtexitIntegration)�LoggingIntegration)�Feature)�is_panel_feature_supported�get_cp_description� getCPName�is_wp2_environment)�get_cl_edition_readable)�UIConfig)�drop_privileges)�get_rhn_systemid_value)�php_get_vhost_versions_user)�gettext� )� sentry_dsn�local_tasks_storage� agent_file� logging_level�jwt_token_location�user_agent_sock)� XRayError�XRayManagerExit�utils�func�returnc �F � �� d� �t � � � � �fd�� � }|S )zf Decorator aimed to update ini file in cagefs-skeleton Applies to task.add nd task.remove c � � t j � | d j d� � }|� d� � r8t d� � r)t j � d|dd� � � }n�|� d� � r�t d � � r�t j � d |dd� � � }t j � t j � |� � � � s1t j t j � |� � � � ndS t j � |� � s�t j � |� � r�t j � |� � r t � d d|i�� � dS t j |� � dS # t $ r7}t � d |t |� � d��� � Y d}~dS d}~ww xY wdS t j � |� � r t � dd|i�� � dS t! |d� � 5 }|� � � }ddd� � n# 1 swxY w Y t j |t j t j z t j z t j z d� � } t j ||� � t j |� � dS # t j |� � w xY w# t $ r7}t � d|t |� � d��� � Y d}~dS d}~ww xY w)zd Copy ini file to cagefs-skeleton Action takes place for cPanel ea-php only r zxray.iniz/opt/cpanelz/usr/share/cagefsz"/usr/share/cagefs/.cpanel.multiphpr Nz /usr/localz/usr/share/cagefs-skeletonz-Refusing to unlink symlink in cagefs-skeleton�xray_ini��extraz'Failed to unlink ini in cagefs-skeleton)r+ �errz0Refusing to copy over symlink in cagefs-skeleton�rbi� z'Failed to copy ini into cagefs-skeleton)�os�path�join�ini_location� startswithr �exists�dirname�mkdir�lexists�islink�logger�warning�unlink�OSError�str�open�read�O_WRONLY�O_CREAT�O_TRUNC� O_NOFOLLOW�write�close)�args�original_ini�skeleton_ini�e�src� src_bytes�fds �J/opt/cloudlinux/venv/lib64/python3.11/site-packages/xray/internal/utils.py�updatezskeleton_update.<locals>.updateJ s� � � �w�|�|�D��G�$8�*�E�E���"�"�=�1�1� �d�#�7%� 7%� ��7�<�<�(L�(4�Q�R�R�(8�:� :�L�L� � $� $�\� 2� 2� �t�,�8.� 8.� ��7�<�<�(D�(4�Q�R�R�(8�:� :�L��7�>�>�"�'�/�/�,�"?�"?�@�@� 8��������6�6�7�7�7���F��w�~�~�l�+�+� 6��w���|�,�,� :��7�>�>�,�/�/� ��N�N�#R�*4�l�)C� #� E� E� E��F�:��I�l�+�+�+�+�+��� :� :� :��N�N�#L�6B�14�Q���*9� *9� #� :� :� :� :� :� :� :� :� :�����:���� :� :� 6��7�>�>�,�/�/� ��N�N�#U�*4�l�)C� #� E� E� E��F� �,��-�-� +�� #��� � �I�+� +� +� +� +� +� +� +� +� +� +���� +� +� +� +��W�\��[�2�:�5�� �B�R�]�R�"�$� $��!��H�R��+�+�+��H�R�L�L�L�L�L��B�H�R�L�L�L�L������ 6� 6� 6����H�2>�-0��V�V�&5� &5� � 6� 6� 6� 6� 6� 6� 6� 6� 6����� 6���ss �3G � H �,H�H �=L �L �J �4L � J�L �J�A L �K>