HEX
Server: Apache/2
System: Linux ind.multivistaglobal.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: multivis (1002)
PHP: 8.1.32
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //etc/exim.easy_spam_fighter/exim_check_attachment.sh
#!/bin/sh

if [ "${1}" != "zip" ]; then
	echo "$0: we can only scan zip files";
	exit 0
fi

UNZIP=/usr/bin/unzip

P=/var/spool/exim/scan/${2}
Z=${3}

cd "${P}"

if [ ! -s $Z ]; then
	exit 0;
fi

if [ $( ${UNZIP} -l "${Z}" | \
	tail -n +4 | head -n -2 | \
	egrep -i '[.](bat|btm|cmd|com|cpl|dat|dll|exe|lnk|msi|pif|prf|reg|scr|vb|vbs|url|jar)$' | \
	wc -l ) -gt 0 ]
then
	exit 1
fi

exit 0