Current location

narf Source control manager Git

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshtrom <shtrom@1991c358-8f32-0410-a49a-990740bdf4c2>2014-02-09 23:28:04 +0000
committershtrom <shtrom@1991c358-8f32-0410-a49a-990740bdf4c2>2014-02-09 23:28:04 +0000
commit7b97e5b13fa6a5cf6635c1faa728c689882a4f03 (patch)
treea2480d2189eb090c1d5bf0640a348da209ba9d32
parent012251aa412d146525e05303edb1e302b410b1ad (diff)
[openbsd/denyhost.sh] Only extract abuse email addresses.
git-svn-id: svn+ssh://scm.narf.ssji.net/svn/shtrom/scripts@1737 1991c358-8f32-0410-a49a-990740bdf4c2
-rwxr-xr-xopenbsd/denyhost.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/openbsd/denyhost.sh b/openbsd/denyhost.sh
index f8bb289..60ebc95 100755
--- a/openbsd/denyhost.sh
+++ b/openbsd/denyhost.sh
@@ -106,8 +106,8 @@ EOF
function extract_email
{
- grep -v changed $1 | 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; \
+ gsed -ne "/abuse.*@/{ \
+ /whois-contact@lacnic.net/d; \
/mail-abuse@cert.br/d; \
/cert@cert.br/d; \
/search-apnic-not-arin@apnic.net/d; \
@@ -115,7 +115,10 @@ function extract_email
/hostmaster@ripe.net/d; \
/.*@apnic.net/d; \
/ncc@ripe.net/d; \
- /search-ripe-ncc-not-arin@ripe.net/d" | \
+ /search-ripe-ncc-not-arin@ripe.net/d; \
+ s/.*[^-+\._A-Za-z0-9]\([-+\._A-Za-z0-9]\+@\([-A-Za-z0-9]\+\.\)\+[A-Za-z]\+\).*/\1/p \
+ }" \
+ $1 |
sort | uniq | gsed ':a N;s/\n/, /g; ta'
}