summaryrefslogtreecommitdiffstats
path: root/abuse.pl
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-05-11 13:27:07 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-05-11 13:27:07 +0200
commit60cb01f9a81c311f914aed4a23e8e5b35e965918 (patch)
tree8b9109a8f1bcf37506755e0e77b83b0a026cda57 /abuse.pl
parenta9ba01279e6f3c64b082f4de6e7d95cd1b5f7dab (diff)
downloadbin-60cb01f9a81c311f914aed4a23e8e5b35e965918.tar.gz
bin-60cb01f9a81c311f914aed4a23e8e5b35e965918.tar.xz
soem more cleanup
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'abuse.pl')
-rwxr-xr-xabuse.pl30
1 files changed, 0 insertions, 30 deletions
diff --git a/abuse.pl b/abuse.pl
deleted file mode 100755
index 42e31a4..0000000
--- a/abuse.pl
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/perl
-use warnings;
-use strict;
-use File::Basename;
-use Net::IP;
-use Net::DNS;
-
-my $abusednsbl = "abuse-contacts.abusix.org";
-
-if (@ARGV == 0) {
- print "usage: ", basename($0), " IP ...\n";
- exit 1;
-}
-
-my $res = Net::DNS::Resolver->new;
-
-for my $host (@ARGV) {
- my $IP = $host;
-
- my $ip = new Net::IP ($IP);
- my $querystring = $ip->reverse_ip().$abusednsbl;
- $querystring =~ s/\.in-addr\.arpa//;
- my $query = $res->query($querystring, "txt");
- if ($query) {
- print (($query->answer)[0]->rdata, "\n");
- } else {
- print "no abuse address for $IP\n";
- exit 1;
- }
-}