amt has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use Net::Whois; use Net::Whois::Arin; use Carp; my $ip = shift; my ($domain, $isp); my $w = Net::Whois::ARIN->new( host => 'whois.arin.net', port => 43, timeout => 30 ); my @output = $w->network($ip); foreach my $r (@output){ if($r->NameServer){ $isp = sprintf("%s", $r->NameServer); my $w = new Net::Whois::Domain $isp or die "Cannot Connect to WHOIS server!\n"; unless( $w->ok ) { croak "No match for $company\n"; } print "Domain: ", $w->domain, "\n"; } else { next; } } exit;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: IDS, ARIN, and Nastygrams
by tachyon (Chancellor) on Oct 13, 2004 at 00:52 UTC | |
by amt (Monk) on Oct 13, 2004 at 17:24 UTC | |
Re: IDS, ARIN, and Nastygrams
by gellyfish (Monsignor) on Oct 13, 2004 at 08:56 UTC | |
Re: IDS, ARIN, and Nastygrams
by DrHyde (Prior) on Oct 13, 2004 at 09:14 UTC |