- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.137.219.213
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/cagefs/cpanel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/cagefs/cpanel//cpanel-hooks-cagefs
#!/bin/bash

###################################################
# Utils for hooks installation or removing        #
###################################################
. /opt/cloudlinux/venv/usr/share/python-cllib/scripts/cl-common


####################################################
# CPanel & EasyApache hooks                        #
####################################################

before_apache_make="/scripts/before_apache_make"
posteasyapache="/scripts/posteasyapache"
postupcp="/scripts/postupcp"

target="cagefs"
common_path="/usr/share/cagefs/cpanel"
####################################################
# Hooks list                                       #
####################################################

cagefs_HOOK="$common_path/cagefs_hook.sh"
suphp_patch_HOOK="$common_path/cpanel-compile-hook2.sh"
posteasyapache_hook="$common_path/cagefs_posteasyapache_hook.sh"
postupcp_hook="$common_path/cagefs_postupcp_hook.sh"

writeToLog "Install cPanel hooks" "$common_path"

#Install hook to build suexec
createHookHeader "$before_apache_make" "$target" "$common_path"
showBar 1

writeToLog "before_apache_make: Headers checked" "$common_path"

checkHookString "$before_apache_make" "$cagefs_HOOK" "CageFS Version $VERSION. Required for apache's suexec recompilation"
removeEmptyStringsFromFile "$before_apache_make"
showBar 2

writeToLog "before_apache_make checked" "$common_path"


#Install hook to patch suphp before make
createHookHeader "$before_apache_make" "$target" "$common_path"
showBar 3

writeToLog "before_apache_make: Headers checked" "$common_path"

checkHookString "$before_apache_make" "$suphp_patch_HOOK" "CageFS Version $VERSION. Required for apache's suphp recompilation"
removeEmptyStringsFromFile "$before_apache_make"
showBar 4

writeToLog "before_apache_make checked" "$common_path"


#Install hook to build suphp
createHookHeader "$posteasyapache" "$target" "$common_path"
showBar 5

writeToLog "posteasyapache: Headers checked" "$common_path"

checkHookString "$posteasyapache" "$posteasyapache_hook" "CageFS Version $VERSION. Required for suphp recompilation"
removeEmptyStringsFromFile "$posteasyapache"
showBar 6

writeToLog "posteasyapache checked" "$common_path"

#Install hook to update CageFS after update of CPanel
createHookHeader "$postupcp" "$target" "$common_path"
showBar 7

writeToLog "postupcp: Headers checked" "$common_path"

checkHookString "$postupcp" "$postupcp_hook" "CageFS Version $VERSION. Update CageFS after update of CPanel"
removeEmptyStringsFromFile "$postupcp"
showBar 8

writeToLog "postupcp checked" "$common_path"

writeToLog "Done installing hooks" "$common_path"

echo

Youez - 2016 - github.com/yon3zu
LinuXploit