[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge pull request sullo#810 from HuntClauss/fix/nprint-error
Browse files Browse the repository at this point in the history
fix: add space in err msgs for proper autodetecion
  • Loading branch information
sullo committed Dec 29, 2023
2 parents d679ca0 + a8611e1 commit d1219f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions program/plugins/nikto_core.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -841,12 +841,12 @@ sub general_config {
}

if ((defined $CLI{'file'}) && ($CLI{'format'} eq "")) {
nprint("+ERROR: Output file specified without a format");
nprint("+ ERROR: Output file specified without a format");
exit 1;
}

if ((!defined $CLI{'file'}) && ($CLI{'format'} ne "none")) {
nprint("+ERROR: Output file format specified without a name");
nprint("+ ERROR: Output file format specified without a name");
exit 1;
}

Expand Down Expand Up @@ -1761,7 +1761,7 @@ sub check_dbs {
foreach my $id (keys %ALL_IDS) {
chomp($id);
next if (($id eq 0) || ($id eq '') || ($id eq 'nikto_id'));
if ($id =~ /[^\d]/) { nprint("+ERROR: Invalid test ID: $id"); next; }
if ($id =~ /[^\d]/) { nprint("+ ERROR: Invalid test ID: $id"); next; }
if (length($id) < 6) { nprint("+WARNING: Possibly invalid test ID: $id"); }
}

Expand Down
4 changes: 2 additions & 2 deletions program/plugins/nikto_fileops.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ sub save_createdir {
$savedir .= "_" . $now;
}
elsif (-f $savedir) {
nprint("+ERROR: Directory from -Savedir is a file.");
nprint("+ ERROR: Directory from -Savedir is a file.");
exit;
}

# create?
if (!-d $savedir) {
mkdir($savedir);
if (!-d $savedir) {
nprint("+ERROR: Unable to create -Save directory '$savedir'",
nprint("+ ERROR: Unable to create -Save directory '$savedir'",
"", ($mark->{'hostname'}, $mark->{'ip'}, $mark->{'displayname'}));
exit;
}
Expand Down

0 comments on commit d1219f7

Please sign in to comment.