S
Sylvain Robitaille
I'm trying to write a Perl script which will (among other things) look
up the Whois information, based on an IP address it encounters, but the
responses I'm getting from Net-Whois-IP-0.35 are not what I'm expecting,
(though I suppose they're technically correct).
Please consider the following test case:
cat -n src/whois_test.pl
1 #!/local/pkg/perl/root-perl-5.8.0/bin/perl -wT
2 #
3 # For looking up Whois info:
4 use Net::Whois::IP qw(whoisip_query);
5
6 my $whois_response = whoisip_query("132.205.7.51", "true");
7 foreach (keys(%{$whois_response}) ) {
8 print "$_:";
9 foreach ( @{$whois_response->{$_}} ) {
10 print " $_\n";
11 }
12 }
13
Now I run the test program:
src/whois_test.pl
OrgID: VR-ARIN
NetName: NET132
PostalCode: 20151
NetType: Early Registrations, Maintained by ARIN
NetHandle: NET-132-0-0-0-0
Address: 3635 Concord Parkway, Suite 200
RegDate: 1993-05-01
Comment:
City: Chantilly
CIDR: 132.0.0.0/8
StateProv: VA
Updated: 2002-08-23
Parent:
OrgName: Various Registries (Maintained by ARIN)
Country: US
NameServer: ARROWROOT.ARIN.NET
BUCHU.ARIN.NET
CHIA.ARIN.NET
DILL.ARIN.NET
EPAZOTE.ARIN.NET
FIGWORT.ARIN.NET
GINSENG.ARIN.NET
HENNA.ARIN.NET
INDIGO.ARIN.NET
NetRange: 132.0.0.0 - 132.255.255.255
However, if I run whois (whois-4.5.29) at the command line, to look up
the same IP address, I get the following response (which is what I
expect to see):
whois 132.205.7.51
OrgName: Concordia University
OrgID: CONCOR-15
Address: 1455 de Maisonneuve ouest
City: Montreal
StateProv: QC
PostalCode: H3G 1M8
Country: CA
NetRange: 132.205.0.0 - 132.205.255.255
CIDR: 132.205.0.0/16
NetName: CONCORDIA
NetHandle: NET-132-205-0-0-1
Parent: NET-132-0-0-0-0
NetType: Direct Assignment
NameServer: CLYDE.CONCORDIA.CA
NameServer: ALCOR.CONCORDIA.CA
NameServer: ZAURAK.CC.UMANITOBA.CA
NameServer: NS4.SRV.CIS.PITT.EDU
Comment:
RegDate: 1989-06-14
Updated: 2003-03-04
AbuseHandle: ABUSE217-ARIN
AbuseName: Abuse
AbusePhone: +1-514-848-7600
AbuseEmail: (e-mail address removed)
# ARIN WHOIS database, last updated 2003-08-05 19:15
# Enter ? for additional hints on searching ARIN's WHOIS database.
Does anyone know how to get Net::Whois::IP to send back the response I'm
expecting, or should I simply call my command-line whois from the script
I'm writing? (it would of course be much cleaner to use a Perl module
for this ...)
--
----------------------------------------------------------------------
Sylvain Robitaille (e-mail address removed)
Systems analyst Concordia University
Instructional & Information Technology Montreal, Quebec, Canada
----------------------------------------------------------------------
up the Whois information, based on an IP address it encounters, but the
responses I'm getting from Net-Whois-IP-0.35 are not what I'm expecting,
(though I suppose they're technically correct).
Please consider the following test case:
cat -n src/whois_test.pl
1 #!/local/pkg/perl/root-perl-5.8.0/bin/perl -wT
2 #
3 # For looking up Whois info:
4 use Net::Whois::IP qw(whoisip_query);
5
6 my $whois_response = whoisip_query("132.205.7.51", "true");
7 foreach (keys(%{$whois_response}) ) {
8 print "$_:";
9 foreach ( @{$whois_response->{$_}} ) {
10 print " $_\n";
11 }
12 }
13
Now I run the test program:
src/whois_test.pl
OrgID: VR-ARIN
NetName: NET132
PostalCode: 20151
NetType: Early Registrations, Maintained by ARIN
NetHandle: NET-132-0-0-0-0
Address: 3635 Concord Parkway, Suite 200
RegDate: 1993-05-01
Comment:
City: Chantilly
CIDR: 132.0.0.0/8
StateProv: VA
Updated: 2002-08-23
Parent:
OrgName: Various Registries (Maintained by ARIN)
Country: US
NameServer: ARROWROOT.ARIN.NET
BUCHU.ARIN.NET
CHIA.ARIN.NET
DILL.ARIN.NET
EPAZOTE.ARIN.NET
FIGWORT.ARIN.NET
GINSENG.ARIN.NET
HENNA.ARIN.NET
INDIGO.ARIN.NET
NetRange: 132.0.0.0 - 132.255.255.255
However, if I run whois (whois-4.5.29) at the command line, to look up
the same IP address, I get the following response (which is what I
expect to see):
whois 132.205.7.51
OrgName: Concordia University
OrgID: CONCOR-15
Address: 1455 de Maisonneuve ouest
City: Montreal
StateProv: QC
PostalCode: H3G 1M8
Country: CA
NetRange: 132.205.0.0 - 132.205.255.255
CIDR: 132.205.0.0/16
NetName: CONCORDIA
NetHandle: NET-132-205-0-0-1
Parent: NET-132-0-0-0-0
NetType: Direct Assignment
NameServer: CLYDE.CONCORDIA.CA
NameServer: ALCOR.CONCORDIA.CA
NameServer: ZAURAK.CC.UMANITOBA.CA
NameServer: NS4.SRV.CIS.PITT.EDU
Comment:
RegDate: 1989-06-14
Updated: 2003-03-04
AbuseHandle: ABUSE217-ARIN
AbuseName: Abuse
AbusePhone: +1-514-848-7600
AbuseEmail: (e-mail address removed)
# ARIN WHOIS database, last updated 2003-08-05 19:15
# Enter ? for additional hints on searching ARIN's WHOIS database.
Does anyone know how to get Net::Whois::IP to send back the response I'm
expecting, or should I simply call my command-line whois from the script
I'm writing? (it would of course be much cleaner to use a Perl module
for this ...)
--
----------------------------------------------------------------------
Sylvain Robitaille (e-mail address removed)
Systems analyst Concordia University
Instructional & Information Technology Montreal, Quebec, Canada
----------------------------------------------------------------------