• Home »
  • Errors »
  • Warning: Can’t Load Net::Whois::IP Module, Whois Queries Desabled

Warning: Can’t Load Net::Whois::IP Module, Whois Queries Desabled

In going through all the tools with Alex on Backtrack I have discovered a few bugs and missing modules or libs. I will be writting posts on how to fix them but I will also be adding the fix’s to Backtrack svn as well. This morning I was writting the article on Dnsenum by my buddy Barbsie and I ran into a missing perl module.

root@666:/pentest/enumeration/dnsenum# ./dnsenum.pl --enum -f dns.txt --update a -r cnn.com
dnsenum.pl VERSION:1.2
Warning: can't load Net::Whois::IP module, whois queries desabled.

Below I will show to to download and install the needed module:

First thing we need to do is download the Net-Whois-IP package from cpan:

root@666:~# wget http://search.cpan.org/CPAN/authors/id/B/BS/BSCHMITZ/Net-Whois-IP-1.04.tar.gz
--2010-05-22 14:24:09--  http://search.cpan.org/CPAN/authors/id/B/BS/BSCHMITZ/Net-Whois-IP-1.04.tar.gz
Resolving search.cpan.org...,
Connecting to search.cpan.org||:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://ftp.ndlug.nd.edu/pub/perl/authors/id/B/BS/BSCHMITZ/Net-Whois-IP-1.04.tar.gz [following]
--2010-05-22 14:24:09--  http://ftp.ndlug.nd.edu/pub/perl/authors/id/B/BS/BSCHMITZ/Net-Whois-IP-1.04.tar.gz
Resolving ftp.ndlug.nd.edu...
Connecting to ftp.ndlug.nd.edu||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4735 (4.6K) [application/x-tar]
Saving to: `Net-Whois-IP-1.04.tar.gz'

100%[====================================================================>] 4,735       --.-K/s   in 0.04s

2010-05-22 14:24:09 (118 KB/s) - `Net-Whois-IP-1.04.tar.gz' saved [4735/4735]

Next, Lets open it in the usual way:

root@666:~# tar xzvf Net-Whois-IP-1.04.tar.gz

Change into the directory of the new package:

root@666:~# cd Net-Whois-IP-1.04

<strong>In perl you have to create the make file in a little bit different fashion than most tools:</strong>
root@666:~/Net-Whois-IP-1.04# perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for Net::Whois::IP

Now we issue the standard make command:

root@666:~/Net-Whois-IP-1.04# make
cp IP.pm blib/lib/Net/Whois/IP.pm
AutoSplitting blib/lib/Net/Whois/IP.pm (blib/lib/auto/Net/Whois/IP)
Manifying blib/man3/Net::Whois::IP.3pm

Perl also allows for a test feature which will make sure you have all the required modules which are depndencies:

root@666:~/Net-Whois-IP-1.04# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
ok 1
ok 1
ok 2
ok 3
ok 4
ok 5
    Things seem OK!

Finally we issue the make install command to finalize the install:

root@666:~/Net-Whois-IP-1.04# make install
Installing /usr/local/share/perl/5.10.0/Net/Whois/IP.pm
Installing /usr/local/share/perl/5.10.0/auto/Net/Whois/IP/autosplit.ix
Installing /usr/local/man/man3/Net::Whois::IP.3pm
Writing /usr/local/lib/perl/5.10.0/auto/Net/Whois/IP/.packlist
Appending installation info to /usr/local/lib/perl/5.10.0/perllocal.pod

One extra thing I always do is issue the make clean command to clean up the file so I can use it on another box if I need to:

root@666:~/Net-Whois-IP-1.04# make clean
rm -f 
          *.a core 
          core.[0-9] blib/arch/auto/Net/Whois/IP/extralibs.all 
          core.[0-9][0-9] IP.bso 
          pm_to_blib.ts core.[0-9][0-9][0-9][0-9] 
          perl tmon.out 
          *.o pm_to_blib 
          blib/arch/auto/Net/Whois/IP/extralibs.ld blibdirs.ts 
          core.[0-9][0-9][0-9][0-9][0-9] *perl.core 
          core.*perl.*.? Makefile.aperl 
          perl IP.def 
          core.[0-9][0-9][0-9] mon.out 
          libIP.def perlmain.c 
          perl.exe so_locations 
rm -rf 
mv Makefile Makefile.old > /dev/null 2>&1

After this Dnsenum and any other tool which works using the Net::Whois::IP Module will work fine.

List Price: $39.99 USD
New From: $14.07 USD In Stock
Used from: $5.93 USD In Stock

List Price: $39.99 USD
New From: $19.99 USD In Stock
Used from: $3.07 USD In Stock