mirror of
https://github.com/jrbrtsn/ban2fail
synced 2024-06-16 03:48:03 +00:00
Add reporting script
This commit is contained in:
parent
bf31a2e77b
commit
0d322eb877
24
cron-rpt.sh
Executable file
24
cron-rpt.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
set -u
|
||||||
|
|
||||||
|
BAN2FAIL=/usr/local/bin/ban2fail
|
||||||
|
TMPFILE=/tmp/$$.cron-rpt.sh
|
||||||
|
|
||||||
|
trap "[[ -e $TMPFILE ]] && rm $TMPFILE" 0
|
||||||
|
|
||||||
|
$BAN2FAIL -a- >$TMPFILE
|
||||||
|
|
||||||
|
while read; do
|
||||||
|
MATCH=$(<$TMPFILE egrep "$REPLY\>")
|
||||||
|
[[ "$MATCH" =~ BLK ]] || continue
|
||||||
|
echo "$MATCH"
|
||||||
|
done <<\_EOF_
|
||||||
|
google\.com
|
||||||
|
outbound\.protection\.outlook\.com
|
||||||
|
mail-mail\.facebook\.com
|
||||||
|
yahoo\.com
|
||||||
|
_EOF_
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user