[go: nahoru, domu]

Skip to content

Commit

Permalink
Move report opening a bit sooner.
Browse files Browse the repository at this point in the history
Add a full report item for a 'no web server' message (check id 000029).
  • Loading branch information
sullo committed May 3, 2016
1 parent b7f1902 commit d5ecf92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions program/nikto.pl
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
$CLI{'cert'} = $CLI{'key'} unless (defined($CLI{'cert'}));
}

# Open reporting
report_head($CLI{'format'}, $CLI{'file'});

# Now check each target is real and remove duplicates/fill in extra information
foreach my $mark (@MARKS) {
$mark->{'test'} = 1;
Expand Down Expand Up @@ -121,9 +124,6 @@
}
}

# Open reporting
report_head($CLI{'format'}, $CLI{'file'});

# Load db_tests
set_scan_items();

Expand Down
3 changes: 2 additions & 1 deletion program/plugins/nikto_core.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ sub port_check {
}
}

nprint("+ No web server found on " . ($hostname || $ip) . ":$port");
add_vulnerability($m,"No web server found on " . ($hostname || $ip) . ":$port", '000029', '', '', '/', $request, $response, "No HTTP response");
nprint("---------------------------------------------------------------------------");

return 0;
Expand Down Expand Up @@ -1930,6 +1930,7 @@ sub report_summary {
###############################################################################
sub report_item {
my ($mark, $item) = @_;
if ($item->{'uri'} == 'undef') { $item->{'uri'} = '/'; }

# Go through all reporting modules
foreach my $reporter (@REPORTS) {
Expand Down

0 comments on commit d5ecf92

Please sign in to comment.