• 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.

bash

  1. root@666:/pentest/enumeration/dnsenum# ./dnsenum.pl --enum -f dns.txt --update a -r cnn.com
  2. dnsenum.pl VERSION:1.2
  3. 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:

bash

  1. root@666:~# wget http://search.cpan.org/CPAN/authors/id/B/BS/BSCHMITZ/Net-Whois-IP-1.04.tar.gz
  2. --2010-05-22 14:24:09--  http://search.cpan.org/CPAN/authors/id/B/BS/BSCHMITZ/Net-Whois-IP-1.04.tar.gz
  3. Resolving search.cpan.org... 207.115.101.144, 64.235.248.44
  4. Connecting to search.cpan.org|207.115.101.144|:80... connected.
  5. HTTP request sent, awaiting response... 302 Found
  6. Location: http://ftp.ndlug.nd.edu/pub/perl/authors/id/B/BS/BSCHMITZ/Net-Whois-IP-1.04.tar.gz [following]
  7. --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
  8. Resolving ftp.ndlug.nd.edu... 129.74.152.229
  9. Connecting to ftp.ndlug.nd.edu|129.74.152.229|:80... connected.
  10. HTTP request sent, awaiting response... 200 OK
  11. Length: 4735 (4.6K) [application/x-tar]
  12. Saving to: `Net-Whois-IP-1.04.tar.gz'
  13.  
  14. 100%[====================================================================>] 4,735       --.-K/s   in 0.04s
  15.  
  16. 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:

bash

  1. root@666:~# tar xzvf Net-Whois-IP-1.04.tar.gz
  2. Net-Whois-IP-1.04/
  3. Net-Whois-IP-1.04/MANIFEST
  4. Net-Whois-IP-1.04/META.yml
  5. Net-Whois-IP-1.04/IP.pm
  6. Net-Whois-IP-1.04/test.pl
  7. Net-Whois-IP-1.04/Changes
  8. Net-Whois-IP-1.04/Makefile.PL

Change into the directory of the new package:

bash

  1. root@666:~# cd Net-Whois-IP-1.04
  2.  
  3. <strong>In perl you have to create the make file in a little bit different fashion than most tools:</strong>
  4. [sourcecode LANG=bash]
  5. root@666:~/Net-Whois-IP-1.04# perl Makefile.PL
  6. Checking if your kit is complete...
  7. Looks good
  8. Writing Makefile for Net::Whois::IP

Now we issue the standard make command:

bash

  1. root@666:~/Net-Whois-IP-1.04# make
  2. cp IP.pm blib/lib/Net/Whois/IP.pm
  3. AutoSplitting blib/lib/Net/Whois/IP.pm (blib/lib/auto/Net/Whois/IP)
  4. 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:

bash

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

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

bash

  1. root@666:~/Net-Whois-IP-1.04# make install
  2. Installing /usr/local/share/perl/5.10.0/Net/Whois/IP.pm
  3. Installing /usr/local/share/perl/5.10.0/auto/Net/Whois/IP/autosplit.ix
  4. Installing /usr/local/man/man3/Net::Whois::IP.3pm
  5. Writing /usr/local/lib/perl/5.10.0/auto/Net/Whois/IP/.packlist
  6. 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:

bash

  1. root@666:~/Net-Whois-IP-1.04# make clean
  2. rm -f \
  3.           *.a core \
  4.           core.[0-9] blib/arch/auto/Net/Whois/IP/extralibs.all \
  5.           core.[0-9][0-9] IP.bso \
  6.           pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
  7.           IP.x  \
  8.           perl tmon.out \
  9.           *.o pm_to_blib \
  10.           blib/arch/auto/Net/Whois/IP/extralibs.ld blibdirs.ts \
  11.           core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
  12.           core.*perl.*.? Makefile.aperl \
  13.           perl IP.def \
  14.           core.[0-9][0-9][0-9] mon.out \
  15.           libIP.def perlmain.c \
  16.           perl.exe so_locations \
  17.           IP.exp
  18. rm -rf \
  19.           blib
  20. 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.

Learning Perl, 5th Edition (Paperback)


List Price: $39.99
New From: $15.85 USD In Stock
Used from: $0.01 USD In Stock

Perl Best Practices (Paperback)


List Price: $39.99 USD
New From: $20.67 USD In Stock
Used from: $0.92 USD In Stock

Share