Hello,<br>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.<br><br>Here is the code which is in the Plugins directory in a file called "nikto_subdomain.plugin":<br>
<br>sub nikto_subdomain<br>{<br><br> <br> 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");
<br><br><br> foreach $subdomain (@subdomain)<br> {<br> <br> LW2::http_close(\%request); # force-close any old connections<br> LW2::http_reset();<br> <br> my $wh = $request{'whisker'}{'Host'};<br> my $h = $request{'Host'};<br>
delete $request{'whisker'}{'Host'};<br> delete $request{'Host'};<br><br> $request{'whisker'}->{'uri_prefix'} = $subdomain;<br> $request{'whisker'}->{'method'} = HEAD;<br>
$request{'whisker'}{'version'} = 1.0;<br> $request{'whisker'}->{'http_eol'};<br><br> LW2::http_do_request(\%request, \%result);<br><br> if (($result{'whisker'}->{'code'} == 200) || ($result{'whisker'}->{'code'} == 302))<br>
{<br> $TESTS{999999}{message} = "Subdomain $subdomain found";<br> $TESTS{999999}{osvdb} = 0;<br> nprint("+ OSVDB-$TESTS{999999}{osvdb}: $TESTS{999999}{message}");<br> } # End if<br><br><br>
} # End foreach<br>} # End sub<br><br><br>Thanks in adavance.<br>