[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge pull request sullo#303 from RealRancor/dbcheck_favicon
Browse files Browse the repository at this point in the history
Added dbcheck for duplicated db_favicon md5s
  • Loading branch information
tautology0 committed Dec 2, 2015
2 parents c3e862c + a2e5c0e commit 11dd5dd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions program/plugins/nikto_core.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,28 @@ sub check_dbs {
}
nprint("\t$count entries");
}
elsif ($file =~ /u?db_favicon/) {
my $counter=0;
my %MD5SUM;
foreach $line (<IN>) {
$line =~ s/^\s+//;
if ($line =~ /^\#/) { next; }
chomp($line);
if ($line eq "") { next; }
$counter++;
my @L = parse_csv($line);
if ($#L ne 2) { nprint("\t+ ERROR: Invalid syntax ($#L): $line"); next; }
if (($L[0] ne 0) && exists($ALL_IDS{$L[0]})) {
nprint("\t+ ERROR: Duplicate Test ID: $L[0]");
}
else { $ALL_IDS{$L[0]}=1; }
if (exists($MD5SUM{$L[1]})) {
nprint("\t+ ERROR: Duplicate MD5sum: $line");
}
else { $MD5SUM{$L[1]}=1; }
}
nprint("\t$counter entries");
}
elsif ($file =~ /u?db_tests/) {
my %ENTRIES;
foreach my $line (<IN>) {
Expand Down

0 comments on commit 11dd5dd

Please sign in to comment.