Current location

narf Source control manager Git

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshtrom <shtrom@1991c358-8f32-0410-a49a-990740bdf4c2>2009-05-25 00:51:26 +0000
committershtrom <shtrom@1991c358-8f32-0410-a49a-990740bdf4c2>2009-05-25 00:51:26 +0000
commitd928677ff8f2fc398899ff01f08b07746b3a2a8a (patch)
tree81d58880a3f6fe71ac9dc059a1d6642eac869282 /openbsd
parent264d0e734033bbdbdf0969e72ad3764e31183954 (diff)
[OpenBSD scripts] Remove registrar addresses commonly appearing in all their
WHOIS. git-svn-id: svn+ssh://scm.narf.ssji.net/svn/shtrom/scripts@546 1991c358-8f32-0410-a49a-990740bdf4c2
Diffstat (limited to 'openbsd')
-rwxr-xr-xopenbsd/denyhost.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsd/denyhost.sh b/openbsd/denyhost.sh
index 33d35cb..e8a8aa5 100755
--- a/openbsd/denyhost.sh
+++ b/openbsd/denyhost.sh
@@ -44,7 +44,8 @@ for IP in `grep -v -f ${TMP_DIR}/blockers.list $NEW_BLOCKERS_FILE`; do
WHOIS_FILE=`mktemp ${TMP_DIR}/whois.XXXXXX`
whois $IP > $WHOIS_FILE
- ABUSE=`grep -v changed $WHOIS_FILE | gsed -n "s/.* \([-+\._A-Za-z0-9]\+@\([-A-Za-z0-9]\+\.\)\+[A-Za-z]\+\).*/\1/p" | \
+ ABUSE=`grep -v changed $WHOIS_FILE | gsed -n "s/.*[^_A-Za-z0-9]\([-+\._A-Za-z0-9]\+@\([-A-Za-z0-9]\+\.\)\+[A-Za-z]\+\).*/\1/p" | \
+ gsed "/whois-contact@lacnic.net/d;/mail-abuse@cert.br/d;/search-apnic-not-arin@apnic.net/d" | \
sort | uniq | gsed ':a N;s/\n/, /g; ta'`
LOGIN_FILE=`mktemp ${TMP_DIR}/logins.list.XXXXXX`