Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while [ 1 ]; do
- read line
- if [ $? -ne 0 ]; then
- echo "read failed, byethnxk"
- exit 1
- fi
- M=$(echo "${line}" | grep 'index2.php' | wc -l)
- if [ $M -eq 1 ]; then
- REF=$(echo "${line}" | awk '{print $5}')
- IP=$(echo "${line}" | awk '{print $1}')
- echo Sleeping for one second
- sleep 1
- echo Now IP Banning "${IP}"
- iptables -A INPUT -s "${IP}" -j DROP
- fi
- done
Add Comment
Please, Sign In to add comment