Changeset 186
- Timestamp:
- 10/18/2009 06:50:56 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
nikto.pl (modified) (1 diff)
-
plugins/nikto_core.plugin (modified) (12 diffs)
-
plugins/nikto_dictionary_attack.plugin (modified) (1 diff)
-
plugins/nikto_single.plugin (modified) (1 diff)
-
plugins/nikto_tests.plugin (modified) (1 diff)
-
plugins/nikto_user_enum_apache.plugin (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/nikto.pl
r177 r186 224 224 my $configfile=$_[0]; 225 225 226 open(CONF, "<$configfile") || return " -ERROR: Unable to open config file '$configfile'";226 open(CONF, "<$configfile") || return "+ ERROR: Unable to open config file '$configfile'"; 227 227 my @CONFILE = <CONF>; 228 228 close(CONF); -
trunk/plugins/nikto_core.plugin
r176 r186 94 94 } 95 95 # print errors to STDERR 96 if ($line =~ / ERROR\:/) { print STDERR "$line\n"; return; }96 if ($line =~ /^+ ERROR\:/) { print STDERR "$line\n"; return; } 97 97 98 98 # don't print to STDOUT if output file is "-" 99 if ($CLI{format} =~ /^xml$/i and $CLI{file} eq "-") { return; } 100 101 # don't print to STDOUT if output file is "-" 102 if ($CLI{format} =~ /^html?$/i and $CLI{file} eq "-") { return; } 103 99 if ($CLI{file} eq "-") { return; } 104 100 105 101 # print to scan details to standard output if the users wants another format and is saving results to a file … … 596 592 597 593 # verify readable dtd 598 if ($CLI{format} =~ /xml/i and!-r $NIKTOCONFIG{NIKTODTD}) { nprint("+ ERROR: reading DTD"); exit; }594 if ($CLI{format} eq 'xml' && !-r $NIKTOCONFIG{NIKTODTD}) { nprint("+ ERROR: reading DTD"); exit; } 599 595 600 596 # screen output … … 759 755 if ($start > $end) 760 756 { 761 nprint(" -ERROR port range $port doesn't make sense - assuming 80/tcp");757 nprint("+ ERROR port range $port doesn't make sense - assuming 80/tcp"); 762 758 next; 763 759 } … … 1040 1036 if ($line eq "") { next; } 1041 1037 my @L=parse_csv($line); 1042 if ($line !~ /^\".*\"\,\".*\"\,\".*\"$/) { print STDERR "\t ERROR: Invalid syntax ($#L): $line\n"; next; }1043 if ($#L ne 3) { print STDERR "\t ERROR: Invalid syntax ($#L): $line\n"; next; }1038 if ($line !~ /^\".*\"\,\".*\"\,\".*\"$/) { print STDERR "\t+ ERROR: Invalid syntax ($#L): $line\n"; next; } 1039 if ($#L ne 3) { print STDERR "\t+ ERROR: Invalid syntax ($#L): $line\n"; next; } 1044 1040 $ENTRIES{"$L[0]"}++; 1045 1041 } 1046 1042 1047 foreach $entry (keys %ENTRIES) { if ($ENTRIES{$entry} > 1) { print STDERR "\t ERROR: Duplicate ($ENTRIES{$entry}): $entry\n"; } }1043 foreach $entry (keys %ENTRIES) { if ($ENTRIES{$entry} > 1) { print STDERR "\t+ ERROR: Duplicate ($ENTRIES{$entry}): $entry\n"; } } 1048 1044 nprint "\t" . keys(%ENTRIES) . " entries\n"; 1049 1045 } … … 1055 1051 if ($line !~ /^\"/) { next; } 1056 1052 my @L=parse_csv($line); 1057 if ($L[4] !~ /(GET|POST|TRACE|TRACK|OPTIONS|SEARCH|INDEX)/i) { print STDERR "\t ERROR: Possibly invalid method: $L[4] on ($line)\n"; }1058 if ($L[5] eq "") { print STDERR "\t ERROR: blank conditional: $line"; next; }1059 if ($line !~ /^\".*\",\".*\",\".*\",\".*\",\".*\"/) { print STDERR "\t ERROR: Invalid syntax ($#L): $line\n"; next; }1060 if ($line !~ /^(\".*\",){11}\".*\"/) { print STDERR "\t ERROR: Invalid syntax ($#L): $line\n"; next; }1061 if (($L[3] =~ /^\@CGI/) && ($L[3] !~ /^\@CGIDIRS/)) { print STDERR "\t ERROR: Possible \@CGIDIRS misspelling: $line"; }1053 if ($L[4] !~ /(GET|POST|TRACE|TRACK|OPTIONS|SEARCH|INDEX)/i) { print STDERR "\t+ ERROR: Possibly invalid method: $L[4] on ($line)\n"; } 1054 if ($L[5] eq "") { print STDERR "\t+ ERROR: blank conditional: $line"; next; } 1055 if ($line !~ /^\".*\",\".*\",\".*\",\".*\",\".*\"/) { print STDERR "\t+ ERROR: Invalid syntax ($#L): $line\n"; next; } 1056 if ($line !~ /^(\".*\",){11}\".*\"/) { print STDERR "\t+ ERROR: Invalid syntax ($#L): $line\n"; next; } 1057 if (($L[3] =~ /^\@CGI/) && ($L[3] !~ /^\@CGIDIRS/)) { print STDERR "\t+ ERROR: Possible \@CGIDIRS misspelling: $line"; } 1062 1058 $ENTRIES{"$L[3],$L[4],$L[5],$L[6],$L[7],$L[8],$L[9],$L[10],$L[12]"}++; 1063 1059 } 1064 1060 1065 foreach $entry (keys %ENTRIES) { if ($ENTRIES{$entry} > 1) { print STDERR "\t ERROR: Duplicate ($ENTRIES{$entry}): $entry\n"; } }1061 foreach $entry (keys %ENTRIES) { if ($ENTRIES{$entry} > 1) { print STDERR "\t+ ERROR: Duplicate ($ENTRIES{$entry}): $entry\n"; } } 1066 1062 nprint "\t" . keys(%ENTRIES) . " entries\n"; 1067 1063 } … … 1072 1068 { 1073 1069 if ($line !~ /^\@/) { next; } 1074 if ($line !~ /^\@.+\=.+$/i ) { print STDERR "\t ERROR: Invalid syntax: $line\n"; }1070 if ($line !~ /^\@.+\=.+$/i ) { print STDERR "\t+ ERROR: Invalid syntax: $line\n"; } 1075 1071 $ctr++; 1076 1072 } … … 1085 1081 chomp($line); 1086 1082 my @L=parse_csv($line); 1087 if ($#L ne 4) { print STDERR "\t ERROR: Invalid syntax: $line\n"; }1083 if ($#L ne 4) { print STDERR "\t+ ERROR: Invalid syntax: $line\n"; } 1088 1084 $ctr++; 1089 1085 } … … 1698 1694 if ($result{'whisker'}{'error'} =~ "Transport endpoint is not connected") 1699 1695 { 1700 nprint(" ERROR: Could not connect to the defined proxy $NIKTOCONFIG{PROXYHOST}");1696 nprint("+ ERROR: Could not connect to the defined proxy $NIKTOCONFIG{PROXYHOST}"); 1701 1697 exit 1; 1702 1698 } … … 2165 2161 foreach my $FILE (sort @NIKTOFILES) 2166 2162 { 2167 open(FI,"<$NIKTOCONFIG{PLUGINDIR}/$FILE") || die print STDERR " -ERROR: Unable to open '$NIKTOCONFIG{PLUGINDIR}/$FILE': $!\n";;;2163 open(FI,"<$NIKTOCONFIG{PLUGINDIR}/$FILE") || die print STDERR "+ ERROR: Unable to open '$NIKTOCONFIG{PLUGINDIR}/$FILE': $!\n";;; 2168 2164 my @F=<FI>; 2169 2165 close(FI); … … 2204 2200 2205 2201 # make sure the db_outdatedb isn't *too* old 2206 open(OD,"<$NIKTOCONFIG{PLUGINDIR}/db_outdated") || die print STDERR " -ERROR: Unable to open '$NIKTOCONFIG{PLUGINDIR}/db_outdated': $!\n";;2202 open(OD,"<$NIKTOCONFIG{PLUGINDIR}/db_outdated") || die print STDERR "+ ERROR: Unable to open '$NIKTOCONFIG{PLUGINDIR}/db_outdated': $!\n";; 2207 2203 @F=<OD>; 2208 2204 close(OD); … … 2296 2292 if ($CONTENT !~ /SUCCESS/) 2297 2293 { 2298 print STDERR " -ERROR: ($RES, $CONTENT): Unable to send updated version string(s) to CIRT.net\n";2294 print STDERR "+ ERROR: ($RES, $CONTENT): Unable to send updated version string(s) to CIRT.net\n"; 2299 2295 } 2300 2296 else … … 2323 2319 unless (open(IN, "<$filename")) 2324 2320 { 2325 nprint(" -ERROR: Unable to open database file $dbname: $!.");2321 nprint("+ ERROR: Unable to open database file $dbname: $!."); 2326 2322 return $dbarray; 2327 2323 } -
trunk/plugins/nikto_dictionary_attack.plugin
r152 r186 54 54 unless (open(IN, "<$dictfile")) 55 55 { 56 nprint(" -ERROR: Unable to open dictionary file $dictfile: $!.");56 nprint("+ ERROR: Unable to open dictionary file $dictfile: $!."); 57 57 } 58 58 -
trunk/plugins/nikto_single.plugin
r41 r186 142 142 143 143 my ($hostname, $ip) = resolve($request{'whisker'}{'host'}); 144 if ($ip eq "") { print STDERR " ERROR: could not resolve host name\n"; exit; }144 if ($ip eq "") { print STDERR "+ ERROR: could not resolve host name\n"; exit; } 145 145 146 146 #### do request -
trunk/plugins/nikto_tests.plugin
r165 r186 66 66 if (defined $result{whisker}->{error}) 67 67 { 68 nprint(" -ERROR: $uri returned an error: $result{whisker}{error}\n");68 nprint("+ ERROR: $uri returned an error: $result{whisker}{error}\n"); 69 69 next; 70 70 } -
trunk/plugins/nikto_user_enum_apache.plugin
r152 r186 151 151 unless (open(IN, "<$filename")) 152 152 { 153 nprint(" -ERROR: Unable to open dictionary file $filename: $!.");153 nprint("+ ERROR: Unable to open dictionary file $filename: $!."); 154 154 } 155 155
Note: See TracChangeset
for help on using the changeset viewer.