%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/scripts2/
Upload File :
Create Path :
Current File : //proc/self/root/scripts2/ddos_exim_attack.sh

#/bin/bash

IFS=$'\n'
	
#echo ${NO_BLOCK_IP%?}

for LINE in `tail -n 1000 /var/log/exim_mainlog | egrep 'too many connections|connection count =' | sort -n | uniq`; do
	IP=`echo $LINE | cut -d '[' -f 2 | cut -d ']' -f 1`
	
	INTERNAL_IP_FOUND=0	

	for INTERNAL_IP in `ifconfig | grep "inet" | grep -v "inet6" | cut -d ' ' -f 10`;do
		if [ "$IP" = "$INTERNAL_IP" ]; then
			INTERNAL_IP_FOUND=1
		fi
	done	

	if [ $INTERNAL_IP_FOUND -eq 0 ]; then
		csf -d $IP
	fi
done

Zerion Mini Shell 1.0