$53 GRAYBYTE WORDPRESS FILE MANAGER $41

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/xray/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/xray//xray_hooks.py
#!/opt/cloudlinux/venv/bin/python3 -bb
# -*- coding: utf-8 -*-

#
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2025 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENCE.TXT

import sys
from distutils.sysconfig import get_python_lib
from pathlib import Path


HOOKS_LISTENERS_DIR = '/usr/share/cloudlinux/hooks/listeners'
USER_DIRS_HOOK = 'xray_user_dirs_hook.py'
ALL_XRAY_HOOKS = (USER_DIRS_HOOK,)


def install_panel_hooks() -> None:
    """
    Install panel hooks for X-Ray
    """

    lve_utils_hooks_dir = Path(get_python_lib(), 'xray', 'hooks')
    for hook in ALL_XRAY_HOOKS:
        listeners_hook_path = Path(HOOKS_LISTENERS_DIR, hook)
        lve_utils_hook_path = Path(lve_utils_hooks_dir, hook)
        # remove old hook pointing to symlink to lve_utils
        if 'lve_utils' in str(listeners_hook_path.resolve()) or 'python3.7' in str(listeners_hook_path.resolve()):
            listeners_hook_path.unlink()
        if not listeners_hook_path.exists() and lve_utils_hook_path.exists():
            listeners_hook_path.symlink_to(lve_utils_hook_path)


def uninstall_panel_hooks() -> None:
    """
    Remove panel hooks for X-Ray
    """
    for hook in ALL_XRAY_HOOKS:
        listeners_hook_path = Path(HOOKS_LISTENERS_DIR, hook)
        if listeners_hook_path.is_symlink():
            listeners_hook_path.unlink()


def _install_hooks():
    """
    Install X-Ray hooks
    """
    install_panel_hooks()


def _uninstall_hooks():
    """
    Uninstall X-Ray hooks
    """
    uninstall_panel_hooks()


def main():
    """
    Install or uninstall X-Ray hooks
    """
    if '--install' in sys.argv:
        _install_hooks()
    elif '--uninstall' in sys.argv:
        _uninstall_hooks()


if __name__ == "__main__":
    main()

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
17 Dec 2025 3.08 AM
root / root
0755
__pycache__
--
17 Dec 2025 2.54 AM
root / root
0755
adviser
--
16 Dec 2025 9.31 PM
root / root
0755
agent
--
16 Dec 2025 9.31 PM
root / root
0755
analytics
--
16 Dec 2025 9.31 PM
root / root
0755
apiclient
--
16 Dec 2025 9.31 PM
root / root
0755
console_utils
--
16 Dec 2025 9.31 PM
root / root
0755
continuous
--
16 Dec 2025 9.31 PM
root / root
0755
hooks
--
16 Dec 2025 9.31 PM
root / root
0755
internal
--
16 Dec 2025 9.31 PM
root / root
0755
manager
--
16 Dec 2025 9.31 PM
root / root
0755
reconfiguration
--
16 Dec 2025 9.31 PM
root / root
0755
__init__.py
0.649 KB
20 Oct 2025 7.04 PM
root / root
0644
cl-smart-advice-user.py
0.711 KB
20 Oct 2025 7.04 PM
root / root
0755
cl-smart-advice.py
0.694 KB
20 Oct 2025 7.04 PM
root / root
0755
cloudlinux-xray-agent.py
0.366 KB
20 Oct 2025 7.04 PM
root / root
0755
cloudlinux-xray-continuous.py
0.374 KB
20 Oct 2025 7.04 PM
root / root
0755
cloudlinux-xray-manager.py
0.375 KB
20 Oct 2025 7.04 PM
root / root
0755
cloudlinux-xray-migrate.py
1.471 KB
20 Oct 2025 7.04 PM
root / root
0755
cloudlinux-xray-user-agent.py
0.363 KB
20 Oct 2025 7.04 PM
root / root
0755
cloudlinux-xray-user-manager.py
0.377 KB
20 Oct 2025 7.04 PM
root / root
0755
create_user_uid_dirs.py
0.762 KB
20 Oct 2025 7.04 PM
root / root
0644
imunify_manager.py
8.516 KB
20 Oct 2025 7.04 PM
root / root
0644
shared_library.py
1.395 KB
20 Oct 2025 7.04 PM
root / root
0644
smart_advice_plugin_helpers.py
5.02 KB
20 Oct 2025 7.04 PM
root / root
0644
smart_advice_plugin_manager.py
12.816 KB
20 Oct 2025 7.04 PM
root / root
0755
user_agent.py
5.665 KB
20 Oct 2025 7.04 PM
root / root
0644
xray_hooks.py
1.776 KB
20 Oct 2025 7.04 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF