This commit is contained in:
Your Name 2024-09-24 21:35:46 -06:00
parent e3590a06a7
commit cff777034e

12
modules/module-nostr.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
FIREWALL="/opt/firewall/firewall.sh"
ACCESS="/tmp/minute.log"
IP=($(grep $DATE $ACCESS | grep "/block=" | cut -d '=' -f2 | cut -d ' ' -f1 | sed 's/"//'))
for i in "${IP[@]}"; do
echo $i
if [[ "$i" == *"npub"* ]]; then
bash /opt/strfry-policies/block.sh $i
else
echo "No Npubs to block"
fi
done