Changeset 324 for trunk/plugins/nikto_core.plugin
- Timestamp:
- 02/10/2010 02:15:09 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/plugins/nikto_core.plugin (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/nikto_core.plugin
r322 r324 958 958 sub load_databases 959 959 { 960 my @dbs=qw/db_404_strings db_outdated db_realms db_tests db_variables /;960 my @dbs=qw/db_404_strings db_outdated db_realms db_tests db_variables db_content_search/; 961 961 my $prefix = $_[0]; 962 962 … … 1013 1013 } 1014 1014 } 1015 1016 # db_content_search 1017 elsif ($file eq 'db_content_search') { 1018 foreach my $l (@file) { 1019 my @T=parse_csv($l); 1020 $CONTENTSEARCH{$T[0]}{'osvdb'}=$T[1]; 1021 $CONTENTSEARCH{$T[0]}{'string'}=$T[2]; 1022 $CONTENTSEARCH{$T[0]}{'message'}=$T[3]; 1023 } 1024 } 1015 1025 1016 1026 # db_outdated … … 1177 1187 nprint "\n"; 1178 1188 exit; 1189 } 1190 ############################################################################### 1191 sub content_search 1192 { 1193 my $body=shift; 1194 my $file=shift; 1195 my $method=shift || "GET"; 1196 my ($mark) = @_; 1197 1198 foreach my $testid (keys %CONTENTSEARCH) { 1199 if ($body =~ /$CONTENTSEARCH{$testid}{string}/i) { 1200 my $outmessage = "$file: $CONTENTSEARCH{$testid}{'message'}"; 1201 add_vulnerability($mark, $outmessage, $CONTENTSEARCH{$testid}{testid}, $CONTENTSEARCH{$testid}{osvdb}, $method, $file); 1202 } 1203 } 1204 1205 return; 1179 1206 } 1180 1207 ############################################################################### … … 2049 2076 } 2050 2077 } 2078 2079 # content search 2080 content_search($result{whisker}->{data}, $request{whisker}->{uri}, $request{whisker}->{method}); 2081 2051 2082 $request{'User-Agent'}=$temp_ua; # reset UA 2052 2083 return $result{'whisker'}->{'code'}, $result{'whisker'}->{'data'}; … … 2170 2201 } 2171 2202 } 2203 2204 # content search 2205 content_search($result{whisker}->{data}, $request{whisker}->{uri}, $request{whisker}->{method}, $mark); 2172 2206 2173 2207 return $result{'whisker'}->{'code'}, $result{'whisker'}->{'data'}, $result{'whisker'}->{'error'};
Note: See TracChangeset
for help on using the changeset viewer.