diff options
Diffstat (limited to 'contrib/rblcheck-dns')
-rwxr-xr-x | contrib/rblcheck-dns | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/contrib/rblcheck-dns b/contrib/rblcheck-dns new file mode 100755 index 0000000..5e96195 --- /dev/null +++ b/contrib/rblcheck-dns | |||
@@ -0,0 +1,69 @@ | |||
1 | #!/usr/bin/perl | ||
2 | # Multi-RBL Query tool, developer Vikram <vr@udel.edu> | ||
3 | use strict; | ||
4 | use Socket; | ||
5 | my $suspect = $ARGV[1]; | ||
6 | |||
7 | die "Syntax: $0 -H <ip address>\n" unless $suspect; | ||
8 | |||
9 | my @rblservers=qw[ | ||
10 | 3y.spam.mrs.kithrup.com | ||
11 | block.blars.org | ||
12 | bl.redhatgate.com | ||
13 | blackholes.five-ten-sg.com | ||
14 | blackholes.intersil.net | ||
15 | blackholes.mail-abuse.org | ||
16 | blackholes.wirehub.net | ||
17 | blacklist.spambag.org | ||
18 | dev.null.dk | ||
19 | dews.qmail.org | ||
20 | dialup.blacklist.jippg.org | ||
21 | dialups.mail-abuse.org | ||
22 | dnsbl.njabl.org | ||
23 | dul.maps.vix.com | ||
24 | dul.orca.bc.ca | ||
25 | dynablock.wirehub.net | ||
26 | formmail.relays.monkeys.com | ||
27 | ipwhois.rfc-ignorant.org | ||
28 | list.dsbl.org | ||
29 | multihop.dsbl.org | ||
30 | okrelays.nthelp.com | ||
31 | pm0-no-more.compu.net | ||
32 | proxies.relays.monkeys.com | ||
33 | rbl-plus.mail-abuse.org | ||
34 | rbl.maps.vix.com | ||
35 | rbl.spam.org.tr | ||
36 | relays.mail-abuse.org | ||
37 | relays.nthelp.com | ||
38 | relays.ordb.org | ||
39 | relays.radparker.com | ||
40 | relays.visi.com | ||
41 | sbl.spamhaus.org | ||
42 | spamguard.leadmon.net | ||
43 | spammers.v6net.org | ||
44 | spamsources.fabel.dk | ||
45 | spews.org | ||
46 | unconfirmed.dsbl.org | ||
47 | xbl.selwerd.cx | ||
48 | ]; | ||
49 | |||
50 | |||
51 | my $spam = 0; | ||
52 | foreach ( @rblservers ) { | ||
53 | my @s = split('\.',$suspect); | ||
54 | my $req = "$s[3].$s[2].$s[1].$s[0].".$_; | ||
55 | |||
56 | my ($name,$aliases,$addrtype,$length,@addrs) = gethostbyname($req); | ||
57 | next unless (@addrs); | ||
58 | |||
59 | my $result = inet_ntoa($addrs[0]); | ||
60 | #next unless (substr($result, 7) eq '127.0.0'); | ||
61 | |||
62 | print "$suspect is listed in the following RBLS: " if ( $spam == 0 ); | ||
63 | print $_, " "; | ||
64 | $spam = 1; | ||
65 | } | ||
66 | |||
67 | print "$suspect is not listed in any RBLS" if ( $spam == 0 ); | ||
68 | print "\n"; | ||
69 | exit( $spam ); | ||