in reply to IDS, ARIN, and Nastygrams

It is trivial to parse the result for all the available emails. You can then take your pick. If you are going to make automatic responses you should be careful not to accidentally mail bomb the destination server(s). To avoid this you need to rate limit your responses to any given email address/domain.

use Net::Whois::ARIN; my $w = Net::Whois::ARIN->new( host => 'whois.arin.net', port => 43, timeout => 30, ); my $result = $w->query( '207.173.0.0' ); my %emails = $result =~ m/^(\w*Email):\s*(\S+)/mg; use Data::Dumper; print Dumper \%emails; __DATA__ $VAR1 = { 'TechEmail' => 'ipadmin@eli.net', 'OrgTechEmail' => 'support@eli.net', 'AbuseEmail' => 'abuse@support.eli.net', 'OrgAbuseEmail' => 'abuse@support.eli.net', 'NOCEmail' => 'support@eli.net' };

cheers

tachyon

Replies are listed 'Best First'.
Re^2: IDS, ARIN, and Nastygrams
by amt (Monk) on Oct 13, 2004 at 17:24 UTC
    Gentlemen,

    I am writing this follow up to tell you that I had more sucess with Net::Whois::Ip. Below is that code that provided the solution.
    my $response = whoisip_query($ip); # Query the ARIN Database foreach (sort keys(%{$response}) ) { $OrgAbuseEmail = $response->{$_} if( $_ eq 'OrgAbuseEmail'); $OrgTechEmail = $response->{$_} if( $_ eq 'OrgTechEmail'); $TechEmail = $response->{$_} if( $_ eq 'TechEmail'); } $smtp = Net::SMTP->new("mymailhost", Timeout => 60); if( $OrgAbuseEmail ){ #lather with Net::SMTP exit; } elsif( $OrgTechEmail ){ #rinse } elsif( $TechEmail ){ #repeat }
    amt.

    perlcheat