403Webshell
Server IP : 172.67.158.161  /  Your IP : 3.138.34.52
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/thread-self/root/opt/cloudlinux/venv/lib64/python3.11/site-packages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/thread-self/root/opt/cloudlinux/venv/lib64/python3.11/site-packages/clhooklib.py
# -*- coding: utf-8 -*-

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

import syslog
from distutils.version import StrictVersion

import cldetectlib as detect
from clcommon.public_hooks.bundle import cpanel

YAML_HOOK_BASE = "/var/cpanel/hooks.yaml"
MANAGE_HOOK = "/usr/local/cpanel/bin/manage_hooks"
SOURCE_PATH = "/usr/share/l.v.e-manager/"
VERIFY_HOOK = SOURCE_PATH + "cpanel/extension/cl_pkg_verify_hook.py"
VERIFY_HOOK_SCRIPTS = "/scripts/cl_pkg_verify_hook.py"

LVE_EXTENSION_HOOKS = (
    cpanel.Hook(VERIFY_HOOK_SCRIPTS, "Whostmgr", "Packages::verify_input_data", "pre"),
    cpanel.Hook(VERIFY_HOOK_SCRIPTS, "Whostmgr", "Accounts::Create", "pre"),
    cpanel.Hook(VERIFY_HOOK_SCRIPTS, "Whostmgr", "Accounts::Modify", "pre"),
)


def log_error(script_name, msg):
    syslog.syslog(script_name + ": " + msg)


def check_cpanel_version(version=None):
    if version is None:
        version = "11.42.1"
    detect.getCP()
    if StrictVersion(detect.CP_VERSION) >= StrictVersion(version):
        return True
    return False


def check_result(result, script_name, msg, equal_result=0):
    if result != equal_result:
        log_error(script_name, msg)

Youez - 2016 - github.com/yon3zu
LinuXploit