Linux server2.hpierson.com 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
Apache
: 162.0.216.123 | : 216.73.216.152
28 Domain
?7.4.33
yvffpqmy
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
lve /
modlscapi /
utils /
[ HOME SHELL ]
Name
Size
Permission
Action
?;
__pycache__
[ DIR ]
drwxr-xr-x
checkconfdutil.pm
2.54
KB
-rwxr-xr-x
cpanel-delete-lve
1.93
KB
-rwxr-xr-x
cpanel-hooks-lve
4.47
KB
-rwxr-xr-x
cpanel-make-lve
984
B
-rwxr-xr-x
cpanel_hooks_manage.py
3.5
KB
-rwxr-xr-x
getdocroot.pm
2.82
KB
-rwxr-xr-x
getdocroots.pm
1.26
KB
-rwxr-xr-x
getuserdomains.pm
1.35
KB
-rwxr-xr-x
inserphpconf.pm
2.53
KB
-rwxr-xr-x
lsapi-cache
1.04
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cpanel-hooks-lve
#!/bin/bash # Copyright (c) Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2018 All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################### # Utils for hooks installation or removing # ################################################### . /usr/share/lve/modlscapi/include/cpanel-common-lve function createHookHeader(){ #1 - hook name if [ ! -e "$common_path_of_cpanel/tmp" ]; then mkdir -p "$common_path_of_cpanel/tmp" fi if [ ! -e "$1" ];then touch "$1" fi if [ -e "$1" ];then chmod 755 "$1" tmp=$(cat "$1" | grep "#!/bin/bash") if [ -z "$tmp" ];then echo "#!/bin/bash" > "$common_path_of_cpanel/tmp/future_hook.tmp.$$" cat "$1" >> "$common_path_of_cpanel/tmp/future_hook.tmp.$$" cat "$common_path_of_cpanel/tmp/future_hook.tmp.$$" > "$1" rm -f "$common_path_of_cpanel/tmp/future_hook.tmp.$$" fi fi } function checkHookString(){ #1 - hook name #2 - pattern string #3 - comment srting if [ -e "$1" ];then tmp=$(cat "$1" | grep "$2") if [ -z "$tmp" ];then echo "$2 #$3" >> "$1" fi fi } function addHookStringFirst(){ #1 - hook name #2 - pattern string #3 - comment srting #4 - short hook name if [ -e "$1" ];then cat "$1" | sed /$4/d | sed 1a"$2 #$3" > "$common_path_of_cpanel/tmp/future_hook.tmp.$$" cat "$common_path_of_cpanel/tmp/future_hook.tmp.$$" > "$1" rm -f "$common_path_of_cpanel/tmp/future_hook.tmp.$$" fi } #################################################### # EasyApache hooks # #################################################### before_apache_make="/scripts/before_apache_make" before_httpd_restart_tests="/scripts/before_httpd_restart_tests" postupcp="/scripts/postupcp" after_apache_make_install="/scripts/after_apache_make_install" posteasyapache="/scripts/posteasyapache" #################################################### # Hooks list # #################################################### lsapi_HOOK="$common_path_of_cpanel/hooks/lsapi.hook" cpanelpostupcp_HOOK="$common_path_of_cpanel/hooks/cpanelpostupcp.hook" clearconf_HOOK="$common_path_of_cpanel/hooks/clearconf.hook" posteasyapache_HOOK="$common_path_of_cpanel/hooks/buildlsphp.hook" writeToLog "Install cPanel hooks" showBar 1 #Install new hooks createHookHeader "$before_apache_make" createHookHeader "$before_httpd_restart_tests" createHookHeader "$postupcp" createHookHeader "$after_apache_make_install" createHookHeader "$posteasyapache" showBar 2 writeToLog "Headers checked" addHookStringFirst "$before_apache_make" "$clearconf_HOOK" "mod_lsapi Version $VERSION. Required for LVE module recompilation" "clearconf.hook" removeEmptyStringsFromFile "$before_apache_make" showBar 3 writeToLog "before_apache_make checked" checkHookString "$before_httpd_restart_tests" "$lsapi_HOOK" "mod_lsapi Version $VERSION mod_lsapi module installation" checkHookString "$before_httpd_restart_tests" "$cpanelpostupcp_HOOK" "mod_lsapi Version $VERSION Rebuild Apache config hook" removeEmptyStringsFromFile "$before_httpd_restart_tests" showBar 4 writeToLog "before_httpd_restart_tests checked" checkHookString "$postupcp" "$cpanelpostupcp_HOOK" "mod_lsapi Version $VERSION Rebuild Apache config hook" removeEmptyStringsFromFile "$postupcp" showBar 5 writeToLog "postupcp checked" showBar 6 writeToLog "after_apache_make_install checked" checkHookString "$after_apache_make_install" "$lsapi_HOOK" "mod_lsapi Version $VERSION mod_lsapi module installation" removeEmptyStringsFromFile "$after_apache_make_install" showBar 7 writeToLog "after_apache_make_install checked" showBar 8 checkHookString "$posteasyapache" "$posteasyapache_HOOK" "mod_lsapi Version $VERSION mod_lsapi module installation" checkHookString "$posteasyapache" "$cpanelpostupcp_HOOK" "mod_lsapi Version $VERSION Rebuild Apache config hook" removeEmptyStringsFromFile "$posteasyapache" writeToLog "posteasyapache checked" showBar 9 writeToLog "Done installing hooks" echo
Close