[Nikto-discuss] Subdomain scanner

Ryan Dewhurst ryandewhurst at gmail.com
Mon May 4 16:54:19 UTC 2009

I have been trying to develop a subdomain scanner for nikto however Ive
never coded in Perl and have now come to a dead end.

Here is the code which is in the Plugins directory in a file called

sub nikto_subdomain

 my @subdomain = ("ftp", "mail", "email", "webmail", "mailboxes", "ns",
"ns1", "ns2", "ns3", "forum", "forums", "admin", "login", "secret", "dev",
"demo", "apps", "iphone", "test", "testing", "testing123", "backup", "adm",
"intranet", "extranet", "net", "cust", "customer", "wap", "www", "blog",
"images", "news", "desktop", "local", "directory", "print", "printer",
"services", "code", "finance", "mobile", "download", "downloads", "upload",
"uploads", "dir", "support", "vpn", "stats", "shop", "web", "db");

 foreach $subdomain (@subdomain)

  LW2::http_close(\%request);    # force-close any old connections

  my $wh = $request{'whisker'}{'Host'};
  my $h  = $request{'Host'};
  delete $request{'whisker'}{'Host'};
  delete $request{'Host'};

 $request{'whisker'}->{'uri_prefix'} = $subdomain;
 $request{'whisker'}->{'method'} = HEAD;
 $request{'whisker'}{'version'}  = 1.0;

 LW2::http_do_request(\%request, \%result);

  if (($result{'whisker'}->{'code'} == 200) || ($result{'whisker'}->{'code'}
== 302))
    $TESTS{999999}{message} = "Subdomain $subdomain found";
    $TESTS{999999}{osvdb} = 0;
    nprint("+ OSVDB-$TESTS{999999}{osvdb}: $TESTS{999999}{message}");
   } # End if

 } # End foreach
} # End sub

Thanks in adavance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://attrition.org/pipermail/nikto-discuss/attachments/20090504/35f2cd9b/attachment.html 

More information about the Nikto-discuss mailing list