One Hat Cyber Team
Your IP :
216.73.217.131
Server IP :
185.33.55.30
Server :
Linux cl30.webspacecontrol.com 5.14.0-611.38.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 10 17:21:28 EDT 2026 x86_64
Server Software :
Apache
PHP Version :
8.1.34
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
whlist
/
View File Name :
whlist-installer.sh
#!/bin/bash ############################################################################################# # Webspacecontrol Email SMTP Allowlist Installer file # Generator : Istvanovszki Zoltan # # Usage: # sh whlist-installer.sh -install # sh whlist-installer.sh -uninstall # sh whlist-installer.sh -update # # If you are unable to run this script via "sh whlist-installer.sh" then please make sure it's # permissions are set correctly. This can be done by typing the following: # # chmod 0755 whlist-installer.sh # ############################################################################################# process_progress() { [ -z $1 ] && exit 0 PROGRESS=(". " " .. " " ... " " .. " " ." " .. " " ... " " .. ") COUNTER=0 echo -n "$2 " while `ps -p $1 > /dev/null`; do [ $COUNTER -eq 8 ] && COUNTER=0 echo -n "${PROGRESS[$COUNTER]}" echo -n " Running " sleep 0.5 printf "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" COUNTER=$(( $COUNTER + 1 )) done echo '...... Complete' } update () { echo "Removing Email SMTP Allowlist older version, Please wait..." rm -rf /usr/local/cpanel/base/3rdparty/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/x3/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/x3/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/x3/whlist/index.php ]; then echo "ERROR: Remove the x3 v2.0 theme file is not completed." fi fi if [ -f /usr/local/cpanel/base/frontend/x3mail/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/x3mail/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/x3mail/whlist/index.php ]; then echo "ERROR: Remove the x3mail v2.0 theme file is not completed." fi fi if [ -f /usr/local/cpanel/base/frontend/paper_lantern/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/paper_lantern/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/paper_lantern/whlist/index.php ]; then echo "ERROR: Remove the paper_lantern theme file is not completed." fi fi if [ -f /usr/local/cpanel/base/frontend/jupiter/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/jupiter/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/jupiter/whlist/index.php ]; then echo "ERROR: Remove the jupiter theme file is not completed." fi fi echo "Removing Email SMTP Allowlist files...... Complete" /usr/local/cpanel/bin/unregister_cpanelplugin /usr/local/cpanel/bin/whlist.cpanelplugin > /dev/null & process_progress $! "Unregistering Email SMTP Allowlist cPanel feature" rm -f /usr/local/cpanel/bin/whlist.cpanelplugin >/dev/null 2>&1 /usr/local/cpanel/scripts/uninstall_plugin whlist.tar.gz >/dev/null 2>&1 echo "Removing Email SMTP Allowlist...... Complete" echo "Install Email SMTP Allowlist...... Please wait..." cp -r cpanel/whlist /usr/local/cpanel/base/3rdparty/ >/dev/null 2>&1 cp -fv cpanel/whlist.cpanelplugin /usr/local/cpanel/bin/ >/dev/null 2>&1 /usr/local/cpanel/bin/register_cpanelplugin /usr/local/cpanel/bin/whlist.cpanelplugin > /dev/null & process_progress $! "Registering Email SMTP Allowlist as new cPanel feature" if [ -f /usr/local/cpanel/base/frontend/x3/index.html ]; then cp -r x3files/whlist /usr/local/cpanel/base/frontend/x3/ >/dev/null 2>&1 fi if [ -f /usr/local/cpanel/base/frontend/x3mail/index.html ]; then cp -r x3files/whlist /usr/local/cpanel/base/frontend/x3mail/ >/dev/null 2>&1 fi if [ -f /usr/local/cpanel/base/frontend/paper_lantern/index.html ]; then cp -r paper_lantern/whlist /usr/local/cpanel/base/frontend/paper_lantern/ >/dev/null 2>&1 fi if [ -f /usr/local/cpanel/base/frontend/jupiter/index.html ]; then cp -r jupiter/whlist /usr/local/cpanel/base/frontend/jupiter/ >/dev/null 2>&1 fi /usr/local/cpanel/scripts/install_plugin --theme paper_lantern whlist.tar.gz >/dev/null 2>&1 /usr/local/cpanel/scripts/install_plugin --theme jupiter whlist.tar.gz >/dev/null 2>&1 echo "Install Email SMTP Allowlist...... Complete" } filesupdate () { echo "Removing Email SMTP Allowlist older version, Please wait..." rm -rf /usr/local/cpanel/base/3rdparty/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/x3/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/x3/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/x3/whlist/index.php ]; then echo "ERROR: Remove the x3 v2.0 theme file is not completed." fi fi if [ -f /usr/local/cpanel/base/frontend/x3mail/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/x3mail/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/x3mail/whlist/index.php ]; then echo "ERROR: Remove the x3mail v2.0 theme file is not completed." fi fi if [ -f /usr/local/cpanel/base/frontend/paper_lantern/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/paper_lantern/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/paper_lantern/whlist/index.php ]; then echo "ERROR: Remove the paper_lantern theme file is not completed." fi fi if [ -f /usr/local/cpanel/base/frontend/jupiter/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/jupiter/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/jupiter/whlist/index.php ]; then echo "ERROR: Remove the jupiter theme file is not completed." fi fi echo "Removing Email SMTP Allowlist files...... Complete" rm -f /usr/local/cpanel/bin/whlist.cpanelplugin >/dev/null 2>&1 /usr/local/cpanel/scripts/uninstall_plugin whlist.tar.gz >/dev/null 2>&1 echo "Removing Email SMTP Allowlist...... Complete" echo "Install Email SMTP Allowlist...... Please wait..." cp -r cpanel/whlist /usr/local/cpanel/base/3rdparty/ >/dev/null 2>&1 cp -fv cpanel/whlist.cpanelplugin /usr/local/cpanel/bin/ >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/x3/index.html ]; then cp -r x3files/whlist /usr/local/cpanel/base/frontend/x3/ >/dev/null 2>&1 fi if [ -f /usr/local/cpanel/base/frontend/x3mail/index.html ]; then cp -r x3files/whlist /usr/local/cpanel/base/frontend/x3mail/ >/dev/null 2>&1 fi if [ -f /usr/local/cpanel/base/frontend/paper_lantern/index.html ]; then cp -r paper_lantern/whlist /usr/local/cpanel/base/frontend/paper_lantern/ >/dev/null 2>&1 fi if [ -f /usr/local/cpanel/base/frontend/jupiter/index.html ]; then cp -r jupiter/whlist /usr/local/cpanel/base/frontend/jupiter/ >/dev/null 2>&1 fi /usr/local/cpanel/scripts/install_plugin --theme paper_lantern whlist.tar.gz >/dev/null 2>&1 /usr/local/cpanel/scripts/install_plugin --theme jupiter whlist.tar.gz >/dev/null 2>&1 echo "Install Email SMTP Allowlist...... Complete" } install () { echo "Install Email SMTP Allowlist...... Please wait..." cp -r cpanel/whlist /usr/local/cpanel/base/3rdparty/ >/dev/null 2>&1 cp -fv cpanel/whlist.cpanelplugin /usr/local/cpanel/bin/ >/dev/null 2>&1 /usr/local/cpanel/bin/register_cpanelplugin /usr/local/cpanel/bin/whlist.cpanelplugin > /dev/null & process_progress $! "Registering Email SMTP Allowlist as new cPanel feature" if [ -f /usr/local/cpanel/base/frontend/x3/index.html ]; then cp -r x3files/whlist /usr/local/cpanel/base/frontend/x3/ >/dev/null 2>&1 fi if [ -f /usr/local/cpanel/base/frontend/x3mail/index.html ]; then cp -r x3files/whlist /usr/local/cpanel/base/frontend/x3mail/ >/dev/null 2>&1 fi if [ -f /usr/local/cpanel/base/frontend/paper_lantern/index.html ]; then cp -r paper_lantern/whlist /usr/local/cpanel/base/frontend/paper_lantern/ >/dev/null 2>&1 fi if [ -f /usr/local/cpanel/base/frontend/jupiter/index.html ]; then cp -r jupiter/whlist /usr/local/cpanel/base/frontend/jupiter/ >/dev/null 2>&1 fi /usr/local/cpanel/scripts/install_plugin --theme paper_lantern whlist.tar.gz >/dev/null 2>&1 /usr/local/cpanel/scripts/install_plugin --theme jupiter whlist.tar.gz >/dev/null 2>&1 echo "Install Email SMTP Allowlist...... Complete" } uninstall () { echo "Removing Email SMTP Allowlist older version, Please wait..." rm -rf /usr/local/cpanel/base/3rdparty/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/x3/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/x3/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/x3/whlist/index.php ]; then echo "ERROR: Remove the x3 theme file is not completed." fi fi if [ -f /usr/local/cpanel/base/frontend/x3mail/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/x3mail/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/x3mail/whlist/index.php ]; then echo "ERROR: Remove the x3mail theme file is not completed." fi fi if [ -f /usr/local/cpanel/base/frontend/paper_lantern/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/paper_lantern/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/paper_lantern/whlist/index.php ]; then echo "ERROR: Remove the paper_lantern theme file is not completed." fi fi if [ -f /usr/local/cpanel/base/frontend/jupiter/whlist/index.php ]; then rm -rf /usr/local/cpanel/base/frontend/jupiter/whlist >/dev/null 2>&1 if [ -f /usr/local/cpanel/base/frontend/jupiter/whlist/index.php ]; then echo "ERROR: Remove the jupiter theme file is not completed." fi fi echo "Removing Email SMTP Allowlist files...... Complete" /usr/local/cpanel/bin/unregister_cpanelplugin /usr/local/cpanel/bin/whlist.cpanelplugin > /dev/null & process_progress $! "Unregistering Email SMTP Allowlist cPanel feature" rm -f /usr/local/cpanel/bin/whlist.cpanelplugin >/dev/null 2>&1 /usr/local/cpanel/scripts/uninstall_plugin whlist.tar.gz >/dev/null 2>&1 echo "Removing Email SMTP Allowlist...... Complete" } [ -z $1 ] && echo "You must add one of the following to the command: -install|-update|-uninstall" && exit 0 case $1 in "-install") install;; "-uninstall") uninstall;; "-update") update;; "-filesupdate") filesupdate;; esac exit 0