Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.6/site-packages/agent360/plugins/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.6/site-packages/agent360/plugins/__pycache__/bitninja.cpython-36.pyc

3

�uGh�@sDddlZddlZddlZdZGdd�dej�Zedkr@e�j�dS)�Nz&/usr/sbin/bitninjacli --stats --minifyc@seZdZdZdd�ZdS)�PluginZbitninjac
Cspy|jtd�}Wnt}YnXtjd|�}|j�}|d}|jd�}|dkrltj||d�j	dd��SdS)aj
        Collects metrics from the BitNinja Linux Agent.

        For this plugin to work, at least BitNinja version 2.38.8 is required, and
        the following configurations must be applied to it:

        /etc/bitninja/System/config.ini:
        ```ini
        [statistics]
        enableIntegration = 1
        ```

        This will allow agent360 to access the statistics.

        Then after a BitNinja restart, the plugin can be tested by running:
        sudo -u agent360 agent360 test bitninja

        Add to /etc/agent360.ini:
        ```ini
        [bitninja]
        enabled = true
        ```
        ZstatCommandzsudo r�{N�
�)
�get�__name__�DEFAULT_STAT_COMMAND�os�popen�	readlines�find�json�loads�replace)�self�config�command�stream�resultZ	firstLineZ
startIndex�r�B/root/tmp/pip-build-gzoz1_uw/agent360/agent360/plugins/bitninja.py�runs

z
Plugin.runN)r�
__module__�__qualname__rrrrrrsr�__main__)Zpluginsr	r
rZ
BasePluginrr�executerrrr�<module>s)

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists