[Nikto-discuss] Subdomain scanner

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


Hello,
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
"nikto_subdomain.plugin":

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
  LW2::http_reset();

  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;
 $request{'whisker'}->{'http_eol'};

 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