HEX
Server: LiteSpeed
System: Linux ws4.angoweb.net 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: tswangoe (2287)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Upload Files
File: //usr/local/lib/python3.9/site-packages/agent360/plugins/__pycache__/wp-toolkit.cpython-39.pyc
a

q�dg5�@s8ddlZddlZGdd�dej�Zedkr4e���dS)�Nc@s eZdZdZdZdZdd�ZdS)�Plugin�
wp-toolkitz
WP ToolkitzPUnified plugin for gathering metrics for WP Toolkit servers on cPanel and Plesk.cCs�d}tj�d�rd}ntj�d�r&d}i}|dkr�tt�d|d����|d<tt�d|d	����|d
<tt�d|d����|d<tt�d|d
����|d<tt�d|d����|d<|SdSdS)a�
        Grabbing some basic information from your cPanel or Plesk server
        If you are using Plesk:
        add to /etc/sudoers the following line:
        agent360 ALL=(ALL) NOPASSWD: /usr/sbin/plesk

        For cPanel:
        agent360 ALL=(ALL) NOPASSWD: /usr/local/bin/wp-toolkit



        test by running:
        sudo -u agent360 agent360 test wp-toolkit
        Add to /etc/agent360.ini:
        [wp-toolkit]
        enabled = yes
        interval = 3600
        �z/var/cpanel/usersrz
/opt/pleskzplesk ext wp-toolkitzsudo -n z3 --list | grep -v "Main Domain ID" | grep . | wc -lzWordPress Websitesz  --list | grep "Working" | wc -lzWordPress Websites - Alivez% --list | grep "Outdated WP" |  wc -lzWordPress Websites - Outdatedz& --list | grep "Outdated PHP" |  wc -lz!WordPress Websites - Outdated PHPz --list | grep "Broken" | wc -lzWordPress Websites - Brokenz!Neither cPanel nor Plesk detectedN)�os�path�isdir�int�popen�read)�self�config�command�data�r�E/usr/local/lib/python3.9/site-packages/agent360/plugins/wp-toolkit.py�runsz
Plugin.runN)�__name__�
__module__�__qualname__�	__title__�__description__rrrrrrsr�__main__)rZpluginsZ
BasePluginrr�executerrrr�<module>s)