Разное по противодействию ботам в ActivityPub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
474 B

#!/bin/bash
# Check existance in list
if [ -z $(egrep -o "$1" ./blacklist_bot-attack.txt) ]; then
# Check MX record
MX_DOMAIN=$(dig +noall +answer MX "$1" | egrep -o " .+$" | sed 's/ //g')
if [ $(egrep "$MX_DOMAIN" ./blacklist_bot-attack.MX.txt) ]; then
# Add domain to list
echo "$1" >> ./blacklist_bot-attack.txt
exit 0
else
echo "MX record $MX_DOMAIN for $1 is not in list!"
exit 1
fi
else
echo "$1 already in list!"
exit 1
fi
exit 1