| Server IP : 81.2.241.106 / Your IP : 216.73.216.165 Web Server : Apache/2.4.67 (Debian) System : Linux tranq-f.bakta.org 5.10.0-45-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64 User : lisky ( 1002) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /opt/ispprotect/ |
Upload File : |
#!/usr/bin/env bash
#################################
# ISPProtect Web Scanner #
# (c) 2015-2021 by ISPConfig UG #
# all rights reserved #
#################################
CDIR="$PWD" ;
SELF=`readlink $0` ;
if [[ "$SELF" == "" ]] ; then
SELF="$0" ;
fi
SYSTYPE=`uname` ;
if [[ "$SYSTYPE" == "FreeBSD" ]] ; then
DIR=$(realpath $(dirname ${SELF})) ;
else
DIR=`readlink -e $(dirname ${SELF})` ;
fi
ARCH=`uname -m` ;
if [[ "$ARCH" == "amd64" ]] ; then
ARCH="x86_64" ;
fi
FIRSTARG="$1"
NO_ROOT="0"
NO_OUT="0"
NO_IONCUBE="0"
for tmpv in "$@" ; do
if [[ "$tmpv" == "--update" || "$tmpv" == "--version" || "$tmpv" == "--json-out" ]] ; then
NO_OUT="1" ;
elif [[ "$tmpv" == "--no-root" ]] ; then
NO_ROOT="1" ;
fi
done
ISPPVER="2.1.2"
if [[ "$NO_OUT" != "1" ]] ; then
echo " _____ _____ _____ _____ _ _ " ;
echo " |_ _|/ ____| __ \| __ \ | | | | " ;
echo " | | | (___ | |__) | |__) | __ ___ | |_ ___ ___| |_ " ;
echo " | | \___ \| ___/| ___/ '__/ _ \| __/ _ \/ __| __| " ;
echo " _| |_ ____) | | | | | | | (_) | || __/ (__| |_ " ;
echo " |_____|_____/|_| |_| |_| \___/ \__\___|\___|\__| " ;
echo " __ __ _ _____ " ;
echo " \ \ / / | | / ____| " ;
echo " \ \ /\ / /__| |__ | (___ ___ __ _ _ __ _ __ ___ _ __ " ;
echo " \ \/ \/ / _ \ '_ \ \___ \ / __/ _\` | '_ \| '_ \ / _ \ '__|" ;
echo " \ /\ / __/ |_) | ____) | (_| (_| | | | | | | | __/ | " ;
echo " \/ \/ \___|_.__/ |_____/ \___\__,_|_| |_|_| |_|\___|_| " ;
echo " " ;
echo " Version ${ISPPVER} " ;
echo "" ;
echo " (c) 2015-$(date +%Y) by ISPConfig UG " ;
echo " all rights reserved " ;
echo "" ;
echo "" ;
fi
if [[ "$PHP" == "" ]] ; then
PHP=`which php` ;
if [[ "$PHP" == "" ]] ; then
if [[ "$NO_OUT" != "1" ]] ; then
echo "Missing PHP binary!" ;
fi
exit 1;
fi
fi
CLAM=`which clamscan` ;
if [[ "$CLAM" != "" || "$@" =~ "--no-malware-scan" ]] ; then
if [[ "$NO_OUT" != "1" ]] ; then
echo -n "";
fi
else
if [[ "$NO_OUT" != "1" ]] ; then
echo "Please install clamav (clamscan binary)!" ;
fi
exit 1;
fi
if [[ "$NO_ROOT" != "1" && "$(id -u)" != "0" ]] ; then
if [[ "$NO_OUT" != "1" ]] ; then
echo "Please run ISPProtect Web Scanner as root.";
fi
exit 1;
fi
PHPVERSION=`$PHP -v 2>/dev/null | head -n 1 | awk '{print $2}' | awk -F'.' '{print $1"."$2}'` ;
if [[ "$PHPVERSION" == "" ]] ; then
if [[ "$NO_OUT" != "1" ]] ; then
echo "Could not get PHP version.";
fi
exit 1;
fi
rm -f ${DIR}/ispp_php.ini ;
SSLCHK=$($PHP -i | grep -E -i 'OpenSSL[[:space:]]+support.+enabled');
echo "disable_functions=" >> ${DIR}/ispp_php.ini
echo "max_execution_time=0" >> ${DIR}/ispp_php.ini
echo "memory_limit=2048M" >> ${DIR}/ispp_php.ini
if [[ "$SSLCHK" != "" ]] ; then
SSLCHK=$($PHP -n -c ${DIR}/ispp_php.ini -i | grep -E -i 'OpenSSL[[:space:]]+support.+enabled');
if [[ "$SSLCHK" == "" ]] ; then
echo "extension=openssl.so" >> ${DIR}/ispp_php.ini
fi
fi
for M in "curl" "json" "mcrypt" "mysqlnd" "mysqli" "simplexml" "mbstring" "zlib" "tokenizer" ; do
SUPP="" ;
if [[ "$M" == "mbstring" ]] ; then
SUPP="${M}[[:space:]]+extension" ;
elif [[ "$M" != "mysqlnd" ]] ; then
SUPP="${M}[[:space:]]+support.+enabled" ;
else
SUPP="${M}[[:space:]]+.+enabled" ;
fi
MODCHK=$($PHP -i 2>/dev/null | grep -E -i "${SUPP}");
if [[ "$MODCHK" != "" ]] ; then
MODCHK=$($PHP -n -c ${DIR}/ispp_php.ini -i 2>/dev/null | grep -E -i "${SUPP}");
if [[ "$MODCHK" == "" ]] ; then
echo "extension=${M}.so" >> ${DIR}/ispp_php.ini
fi
fi
done
if [[ $@ =~ "--threads=" ]] ; then
SWLCHK=$($PHP -i | grep -E -i '^swoole');
if [[ "$SWLCHK" != "" ]] ; then
SWLCHK=$($PHP -n -c ${DIR}/ispp_php.ini -i | grep -E -i '^swoole');
if [[ "$SWLCHK" == "" ]] ; then
echo "extension=sockets.so" >> ${DIR}/ispp_php.ini ;
echo "extension=swoole.so" >> ${DIR}/ispp_php.ini ;
fi
fi
CLAMD=`which clamd` ;
if [[ "$CLAMD" != "" || "$@" =~ "--no-malware-scan" ]] ; then
if [[ "$NO_OUT" != "1" ]] ; then
echo -n "";
fi
else
if [[ "$NO_OUT" != "1" ]] ; then
echo "Please install clamav daemon (clamd binary)!" ;
fi
exit 1;
fi
CLAMD=`which clamdscan` ;
if [[ "$CLAMD" != "" || "$@" =~ "--no-malware-scan" ]] ; then
if [[ "$NO_OUT" != "1" ]] ; then
echo -n "";
fi
else
if [[ "$NO_OUT" != "1" ]] ; then
echo "Please install clamav daemon client (clamdscan binary)!" ;
fi
exit 1;
fi
fi
SYSVER="" ;
SGCHECK=$($PHP -n -c ${DIR}/ispp_php.ini -q ${DIR}/ispp_loader.php);
if [[ "${SGCHECK}" == "ERR" ]] ; then
echo "Failed downloading SafeGuard Loader. Please install manually." ;
exit 1;
elif [[ "${SGCHECK}" != "" ]] ; then
echo "extension=${SGCHECK}" >> ${DIR}/ispp_php.ini ;
fi
if [[ -e "${DIR}/ispp_php.ini.local" ]] ; then
echo "" >> ${DIR}/ispp_php.ini
cat "${DIR}/ispp_php.ini.local" >> ${DIR}/ispp_php.ini
fi
if [[ "$COLUMNS" == "" && -e "/usr/bin/tput" && "$TERM" != "" ]] ; then
COLUMNS=`tput cols 2>/dev/null`;
fi
export COLUMNS ;
if [[ "$FIRSTARG" == "--system-report" ]] ; then
REPFILE="${DIR}/system_report.txt" ;
echo "[ispprotect]" > $REPFILE ;
echo "install.path = ${DIR}" >> $REPFILE ;
echo "install.version = ${ISPPVER}" >> $REPFILE ;
echo "[system]" >> $REPFILE ;
echo "system.kernel = $(uname -a)" >> $REPFILE ;
echo "system.architecture = ${ARCH}" >> $REPFILE ;
echo "[php]" >> $REPFILE ;
echo "php.binary = ${PHP}" >> $REPFILE ;
echo "[ioncube]" >> $REPFILE ;
$PHP -n -c ${DIR}/ispp_php.ini -q -v | grep -E -i 'ionCube.+Loader' >> $REPFILE ;
echo "[phpinfo]" >> $REPFILE ;
$PHP -n -c ${DIR}/ispp_php.ini -q -i >> $REPFILE ;
echo "Report dumped to $REPFILE";
exit 0;
fi
if [[ "$COLUMNS" == "" && -e "/bin/stty" ]] ; then COLUMNS=$(stty size 2>/dev/null | awk '{print $2}' 2>/dev/null) ; fi
export COLUMNS ;
$PHP -n -c ${DIR}/ispp_php.ini -q ${DIR}/ispp_scan.php "$@";
RET=$? ;
cd $CDIR ;
exit $RET ;