Changeset 285
- Timestamp:
- 01/27/2010 07:48:17 PM (3 years ago)
- Location:
- trunk/plugins
- Files:
-
- 5 edited
-
nikto_core.plugin (modified) (7 diffs)
-
nikto_httpoptions.plugin (modified) (1 diff)
-
nikto_msgs.plugin (modified) (2 diffs)
-
nikto_report_html.plugin (modified) (1 diff)
-
nikto_report_text.plugin (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/nikto_core.plugin
r281 r285 97 97 } 98 98 # print errors to STDERR 99 if ($line =~ /^ + ERROR\:/) { print STDERR "$line\n"; return; }99 if ($line =~ /^\+ ERROR\:/) { print STDERR "$line\n"; return; } 100 100 101 101 # don't print to STDOUT if output file is "-" 102 if ( $CLI{'file'} eq "-") { return; }102 if ((defined $CLI{file}) && ($CLI{'file'} eq "-")) { return; } 103 103 104 104 # print to scan details to standard output if the users wants another format and is saving results to a file … … 619 619 else { nprint("+ ERROR: Invalid output format"); exit; } 620 620 621 if (( $CLI{'file'} ne "") && ($CLI{'format'} eq "")) { nprint("+ERROR: Output file specified without a format"); exit; }621 if ((defined $CLI{'file'}) && ($CLI{'format'} eq "")) { nprint("+ERROR: Output file specified without a format"); exit; } 622 622 623 623 # verify readable dtd … … 768 768 my $host_ctr=1; 769 769 my @hosts=split(/,/,$hostlist); 770 my @ports=split(/,/,$portlist) ;770 my @ports=split(/,/,$portlist) if defined $portlist; 771 771 my @checkhosts; 772 772 my @results; … … 780 780 if ($port =~ /-/) 781 781 { 782 my $start, $end;782 my ($start, $end); 783 783 my @temp=split(/-/,$port); 784 784 $start=$temp[0]; … … 1190 1190 { 1191 1191 my ($hostname, $ip, $port) = @_; 1192 my %m, %headers;1192 my (%m, %headers); 1193 1193 1194 1194 $m->{hostname}=$hostname; … … 1271 1271 if ($torun_plugin eq "ALL" || 1272 1272 $pluginhash->{name} eq $torun_plugin) { 1273 $pluginhash->{run}= true;1273 $pluginhash->{run}="true"; 1274 1274 } 1275 1275 } … … 1994 1994 my ($mark, $uri, $method, $data, $headers, $noclean) = @_; 1995 1995 if ($CLI{'pause'} > 0) { sleep $CLI{'pause'}; } 1996 my %request, %result;1996 my (%request, %result); 1997 1997 setup_hash(\%request, $mark); 1998 1998 -
trunk/plugins/nikto_httpoptions.plugin
r284 r285 45 45 my $aoptions = "$headers{allow}, "; 46 46 my $poptions = "$headers{public}, "; 47 my ($allow_methods, $public_methods, $txt); 47 my ($allow_methods, $public_methods); 48 my $txt = ""; 48 49 my $dbarray; 49 50 -
trunk/plugins/nikto_msgs.plugin
r275 r285 64 64 # Computer name 65 65 my $name=$CONTENT; 66 $name =~ s#(^.*<ComputerName>)([a-zA-Z0-9]*)(</ComputerName>.*$)# \2#;66 $name =~ s#(^.*<ComputerName>)([a-zA-Z0-9]*)(</ComputerName>.*$)#$2#; 67 67 my $eposerver=$CONTENT; 68 $eposerver =~ s#(^.*<ePOServerName>)([a-zA-Z0-9]*)(</ePOServerName>.*$)# \2#;68 $eposerver =~ s#(^.*<ePOServerName>)([a-zA-Z0-9]*)(</ePOServerName>.*$)#$2#; 69 69 add_vulnerability($mark,"Web server is a McAfee ePO agent, showing the hostname is $name and the ePO server is $eposerver.",80100,0); 70 70 } … … 81 81 { 82 82 $name=$line; 83 $name =~ s#(^.*System Management Homepage for )([a-zA-Z0-9]*)(</font>.*$)# \2#;83 $name =~ s#(^.*System Management Homepage for )([a-zA-Z0-9]*)(</font>.*$)#$2#; 84 84 } 85 85 if ($line =~ "new ObjectIpAddresses") 86 86 { 87 87 my $ipaddr=$line; 88 $ipaddr =~ s#(^.*new ObjectIpAddresses\(")([\d\.]+)("\);.*$)# \2#;88 $ipaddr =~ s#(^.*new ObjectIpAddresses\(")([\d\.]+)("\);.*$)#$2#; 89 89 nprint("$ipaddr"); 90 90 $ipaddrs .= " $ipaddr"; -
trunk/plugins/nikto_report_html.plugin
r279 r285 196 196 } 197 197 198 sub nikto_reports { } # so core doesn't freak199 200 198 1; -
trunk/plugins/nikto_report_text.plugin
r269 r285 53 53 { 54 54 my ($handle, $mark) = @_; 55 my $curr_host, $curr_port;55 my ($curr_host, $curr_port); 56 56 print $handle "+ Target Host: $mark->{hostname}\n"; 57 57 print $handle "+ Target Port: $mark->{port}\n";
Note: See TracChangeset
for help on using the changeset viewer.