GRAYBYTE WORDPRESS FILE MANAGER8838

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/simple_rpc/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/simple_rpc//hosting_panel.py
from defence360agent.subsys.panels.base import PanelException
from defence360agent.subsys.panels.directadmin import DirectAdmin
from defence360agent.subsys.panels.hosting_panel import HostingPanel
from defence360agent.rpc_tools import ValidationError
from defence360agent.rpc_tools.lookup import RootEndpoints, bind


class HostingPanelEndpoints(RootEndpoints):
    @bind("enable-plugin")
    async def enable_plugin(self, plugin_name=None):
        return await self.hosting_panel.enable_imunify360_plugin(plugin_name)

    @bind("disable-plugin")
    async def disable_plugin(self, plugin_name=None):
        return await self.hosting_panel.disable_imunify360_plugin(plugin_name)

    @bind("add-sudouser")
    async def add_sudouser(self, user):
        hp = self.hosting_panel
        if not isinstance(hp, DirectAdmin):
            raise ValidationError("Feature available only for DirectAdmin")

        return await hp.add_sudouser(user)

    @bind("delete-sudouser")
    async def delete_sudouser(self, user):
        hp = self.hosting_panel
        if not isinstance(hp, DirectAdmin):
            raise ValidationError("Feature available only for DirectAdmin")

        return await hp.delete_sudouser(user)

    @bind("list-docroots")
    async def get_docroots(self):
        return {"items": await self.hosting_panel.list_docroots()}

    @property
    def hosting_panel(self):
        try:
            return HostingPanel()
        except PanelException as e:
            raise ValidationError(str(e))

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 11 2025 07:52:56
root / root
0755
__pycache__
--
July 11 2025 07:52:56
root / root
0755
schema
--
July 11 2025 07:52:56
root / root
0755
schema_responses
--
July 11 2025 07:52:56
root / root
0755
__init__.py
15.356 KB
July 09 2025 15:10:25
root / root
0644
advisor.py
1.493 KB
July 09 2025 15:10:25
root / root
0644
analyst_cleanup.py
7.074 KB
July 09 2025 15:10:25
root / root
0644
endpoints.py
10.874 KB
July 09 2025 15:10:25
root / root
0644
hooks.py
2.821 KB
July 09 2025 15:10:25
root / root
0644
hosting_panel.py
1.479 KB
July 09 2025 15:10:25
root / root
0644
myimunify.py
2.7 KB
July 09 2025 15:10:25
root / root
0644
permissions.py
0.304 KB
July 09 2025 15:10:25
root / root
0644
plesk_stats.py
4.319 KB
July 09 2025 15:10:25
root / root
0644
reputation_management.py
1.946 KB
July 09 2025 15:10:25
root / root
0644
schema.py
6.816 KB
July 09 2025 15:10:25
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF