-
Notifications
You must be signed in to change notification settings - Fork 0
/
rbl_check_domain_full.sh
executable file
·98 lines (87 loc) · 2.43 KB
/
rbl_check_domain_full.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/sh
# Check if domain is listed on one of the following blacklists
# The format is chosen to make it easy to add or delete
# The shell will strip multiple whitespace
DNS="1.1.1.1"
Abusix_API_key=""
BLISTS_DOM="
0spamurl.fusionzero.com
abuse.rfc-clueless.org
badconf.rhsbl.sorbs.net
bl.fmb.la
black.dnsbl.brukalai.lt
black.junkemailfilter.com
blacklist.netcore.co.in
bogusmx.rfc-clueless.org
bsb.empty.us
bsb.spamlookup.net
communicado.fmb.la
d.bl.zenrbl.pl
dbl.nordspam.com
dbl.spamhaus.org
dbl.suomispam.net
dbl.tiopan.com
dnsbl.abyan.es
dnsbl.spfbl.net
dob.sibl.support-intelligence.net
dsn.rfc-clueless.org
dul.blackhole.cantv.net
elitist.rfc-clueless.org
fresh.spameatingmonkey.net
fresh10.spameatingmonkey.net
fresh15.spameatingmonkey.net
fresh30.spameatingmonkey.net
freshzero.spameatingmonkey.net
fulldom.rfc-clueless.org
hog.blackhole.cantv.net
light.dnsbl.brukalai.lt
mailsl.dnsbl.rjek.com
multi.surbl.org
nomail.rhsbl.sorbs.net
nsbl.fmb.la
postmaster.rfc-clueless.org
public.sarbl.org
rhsbl-h.rbl.polspam.pl
rhsbl.blackhole.cantv.net
rhsbl.rbl.polspam.pl
rhsbl.rymsho.ru
rhsbl.scientificspam.net
rhsbl.sorbs.net
rhsbl.zapbl.net
rot.blackhole.cantv.net
short.fmb.la
spam.blackhole.cantv.net
ubl.nszones.com
uri.blacklist.woody.ch
uribl.abuse.ro
uribl.mailcleaner.net
uribl.pofon.foobar.hu
uribl.rspamd.com
uribl.spameatingmonkey.net
uribl.swinog.ch
uribl.zeustracker.abuse.ch
urired.spameatingmonkey.net
url.0spam.org
urlsl.dnsbl.rjek.com
"
# simple shell function to show an error message and exit
# $0 : the name of shell script, $1 is the string passed as argument
# >&2 : redirect/send the message to stderr
ERROR() {
echo $0 ERROR: $1 >&2
exit 2
}
# -- Sanity check on parameters
[ $# -ne 1 ] && ERROR 'Please specify a single domain'
# -- cycle through the domain blacklists
for BL in ${BLISTS_DOM} ; do
# print the UTC date (without linefeed)
printf $(env TZ=UTC date "+%Y-%m-%d_%H:%M:%S_%Z")
# show the reversed IP and append the name of the blacklist
printf "%-40s" " ${1}.${BL}."
# use dig to lookup the name in the blacklist
# echo "$(dig +short -t a ${1}.${BL}. @${DNS} | tr '\n' ' ')"
LISTED="$(dig +short -t a ${1}.${BL}. @${DNS})"
echo ${LISTED:----}
done
# --- EOT ------