One Hat Cyber Team
Your IP :
52.15.210.243
Server IP :
192.145.235.60
Server :
Linux ngx365.inmotionhosting.com 5.14.0-427.33.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 30 09:45:56 EDT 2024 x86_64
Server Software :
Apache
PHP Version :
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
sharedrads
/
__pycache__
/
View File Name :
cms_counter.cpython-39.pyc
a �gt � @ s� d Z ddlZddlZddlZddlZddlZddlmZ ddlZddl Z ddl Z ddd�Zdd� Zd d � Z dd� Zdd d�Zddd�Zd dd�Zd!dd�Zdddg fdd�Zd"dd�Zdd� Zedkr�e� dS )#a� CMS Counter 2.1 06/03/2024 Corey S ------- All Server Version - Should be acceptable for any server environment - Server Type determined by Fabric wrapper ckx.run_cms_counter() and passed to script via '-s' - 3rd Party/Additional Panels added to determine_panel_type() - Refactored NodeJS detection split into its own module - '--new' switch added to only check newly provisioned accounts - Overall code refactored to be more efficient � N)�PathTc C s� d}| rlt | �rl|dkrlz$tj| d|tjd�j�d��� }W q� tyh } zt|� W Y d}~q�d}~0 0 nL| r�t | �r�|dkr�z(tj| d|tjtj d�j�d��� }W n Y dS 0 |S )z� check_flag ignores if the command exits w/ anything other than 0 if True error_flag sends errors to /dev/null if set to True NT)�shell�check�stdout�utf-8F)r r r �stderr) �str� subprocess�run�PIPEr �decode�strip� Exception�printZDEVNULL)�command� check_flag� error_flag�output�e� r �./opt/sharedrads/cms_counter.pyr s6 �� ��r c C s� t j�d�rdS t j�d�r dS t j�d�r0dS t j�d�r@dS t j�d �sXt j�d �r\dS t j�d�rld S t j�d�r|dS t j�d�r�dS t j�d�r�dS dS )a Determines type of Panel in use on server, i.e. CWP, Platform i, Plesk, etc Panels Currently Supported: - cPanel - CWP - Platform i - Webmin - Plesk - ISPConfig - DirectAdmin - CloudPanel �/var/cpanelZcPanelz/usr/local/cwpZCWPz/etc/profile.d/wp3.shZ Platform_iz/etc/webminZWebminz&/etc/httpd/conf.d/zz010_psa_httpd.confz(/etc/apache2/conf.d/zz010_psa_httpd.confZPleskz/usr/local/directadminZDirectAdminz/usr/local/bin/dployZ CloudPanelz//home/admispconfig/ispconfig/lib/config.inc.phpzISPConfig-2z1/usr/local/ispconfig/interface/lib/config.inc.phpzISPConfig-3ZcVPS��os�path�existsr r r r �determine_panel_type8 s&