golden hour
/opt/imunify360/venv/lib/python3.11/site-packages/clcommon/__pycache__
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.cpython-311.pyc
1.54 KB
Del
OK
clcagefs.cpython-311.pyc
15.5 KB
Del
OK
clcaptain.cpython-311.pyc
4.31 KB
Del
OK
clconfig.cpython-311.pyc
3.19 KB
Del
OK
clconfpars.cpython-311.pyc
16.37 KB
Del
OK
clcustomscript.cpython-311.pyc
1.85 KB
Del
OK
cldebug.cpython-311.pyc
1.29 KB
Del
OK
clemail.cpython-311.pyc
2.42 KB
Del
OK
clexception.cpython-311.pyc
1.7 KB
Del
OK
clfunc.cpython-311.pyc
11.95 KB
Del
OK
clhook.cpython-311.pyc
6.16 KB
Del
OK
cllog.cpython-311.pyc
2.78 KB
Del
OK
cloutput.cpython-311.pyc
846 B
Del
OK
clproc.cpython-311.pyc
8.93 KB
Del
OK
clpwd.cpython-311.pyc
11.97 KB
Del
OK
clquota.cpython-311.pyc
1.79 KB
Del
OK
clsec.cpython-311.pyc
1.55 KB
Del
OK
clwpos_lib.cpython-311.pyc
20.95 KB
Del
OK
const.cpython-311.pyc
293 B
Del
OK
evr_utils.cpython-311.pyc
5.06 KB
Del
OK
features.cpython-311.pyc
6.08 KB
Del
OK
group_info_reader.cpython-311.pyc
6.46 KB
Del
OK
lock.cpython-311.pyc
1.97 KB
Del
OK
mail_helper.cpython-311.pyc
7.2 KB
Del
OK
mysql_lib.cpython-311.pyc
10.01 KB
Del
OK
php_conf_reader.cpython-311.pyc
11.29 KB
Del
OK
sysctl.cpython-311.pyc
10.42 KB
Del
OK
ui_config.cpython-311.pyc
4.69 KB
Del
OK
utils.cpython-311.pyc
40.28 KB
Del
OK
utils_cmd.cpython-311.pyc
4.19 KB
Del
OK
Edit: clfunc.cpython-311.pyc
� ��i� � �� � d dl Z d dlZd dlZd dlZd dlZdZd� Zddddd�Zd ee z d ee z dz fd�Z d ej fd�Zd ej fd �Z d� Zd� Zdd�Zdd�Zdd�Zd� Zd� Zd� Zd� Zded efd�ZdS )� Nz/proc/lve/listc �z � t t d�� � 5 } | � d� � }ddd� � n# 1 swxY w Y t |� dd� � d � � dg}nJ# t $ r dd t � �g}Y n2t $ r dd t � �g}Y nt $ r ddt � �g}Y nw xY w|S )z/ Obtain lve process filesystem version �utf-8��encoding� N�:� r �OKz+clcommon: get_lve_version: Can`t open file z/clcommon: get_lve_version: Can`t get data from z'clcommon: get_lve_version: Can`t parse )�open�LVE_FILE�read�int�rsplit�IOError� IndexError� ValueError)�f�line�lve_procfs_versions �o/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/clcommon/clfunc.py�get_lve_versionr sF � � Z� �(�W� -� -� -� ���6�6�!�9�9�D� � � � � � � � � � � ���� � � � �!�$�+�+�c�1�"5�"5�a�"8�9�9�4�@����� ^� ^� ^�"�$\�RZ�$\�$\�]����� b� b� b�"�$`�V^�$`�$`�a����� Z� Z� Z�"�$X�h�$X�$X�Y����Z���� �s: �A1 �:�A1 �>�A1 �>�.A1 �1B8� B8� B8�7B8r � � i @)�K�M�G�T�val�returnc �( � t | � � }t j d� � }|� |� � }|r@t | t t f� � rt | � � S |� d� � S t j d� � }|� |� � }|r|� d� � � d�S t j dt j � � }|� |� � }|r|� � � \ }}}|� |� �S dS )z� Check that the value is a valid CPU limit (0-100 int or speed (% or MHz/GHz)). Return the value if valid, otherwise None. If the value contains decimal part, return only integer part. z^([1-9][0-9]?|100)(?:\.(\d+))?$r z"^([1-9]|[1-9][0-9]*)(?:\.(\d+))?%$�%z*^([1-9]|[1-9][0-9]*)(?:\.(\d+))?(mhz|ghz)$N) �str�re�compile�match� isinstance�floatr �group� IGNORECASE�groups) r �data� regexp_int�regex_match� regexp_speedp� regexp_speedf�integer_part�_�units r �validate_cpur3 - s � � �s�8�8�D� ��>�?�?�J��"�"�4�(�(�K�� $��c�E�3�<�(�(� ��s�8�8�O�� � ��#�#�#� �J�D�E�E�M��%�%�d�+�+�K�� *��#�#�A�&�&�)�)�)�)� �J�L�b�m�\�\�M��%�%�d�+�+�K�� '� +� 2� 2� 4� 4���a���&��&�&�&��4� c �p � t | � � }n# t $ r Y dS w xY w||cxk r|k rn dS | S dS )zH Check that val - is a string number return val as a string N)r r )r �min_val�max_val�dig_vals r �validate_intr9 M sh � � ��c�(�(����� � � ��t�t������'�$�$�$�$�W�$�$�$�$�$�$�� � %�$s � � � c �< � | d }|� � � rd}| |z } t t | d d� � � t |� � � z dz � � }||cxk r|k rn n|S n# t t t f$ r Y nw xY wd S )N���r � )�isdigitr r'