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# ./ --enum -f dns.txt --update a -r 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
--2010-05-22 14:24:09--
Connecting to||:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: [following]
--2010-05-22 14:24:09--
Connecting to||: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>
[sourcecode LANG=bash]
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 blib/lib/Net/Whois/
AutoSplitting blib/lib/Net/Whois/ (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"
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/
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.

Learning Perl, 5th Edition (Paperback)

By (author): Randal Schwartz, Tom Phoenix, brian d foy

List Price: $39.99 USD
New From: $39.24 USD In Stock
Used from: $5.83 USD In Stock

Perl Best Practices (Paperback)

By (author): Damian Conway

List Price: $39.99 USD
New From: $14.96 USD In Stock
Used from: $7.91 USD In Stock

Tags: , , , , , , , , , , ,
2 Responses to “Warning: Can’t Load Net::Whois::IP Module, Whois Queries Desabled”
  1. barbsie says:


    Personally I find it a lot easier to use the CPAN built-in installer:

    barbsie@xps:~$ perl -MCPAN -e shell
    Terminal does not support AddHistory.

    cpan shell — CPAN exploration and modules installation (v1.9402)
    Enter ‘h’ for help.

    cpan[1]> install Net::Whois


  2. Adam says:

    Thanks for posting this and thanks to barbsie for the comment. Seems this module is missing even in the latest Kali release.


Leave a Reply

*Type the letter/number combination in the abvoe field before clicking submit.