1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-11 16:06:33 +00:00

Limit -v and -d to 10 max.

This commit is contained in:
dmiller
2018-10-08 20:49:20 +00:00
parent e48361523b
commit 466bf8ff65
4 changed files with 19 additions and 14 deletions

View File

@@ -320,14 +320,13 @@ bool keyWasPressed()
// printf("You pressed key '%c'!\n", c);
if (c == 'v') {
o.verbose++;
if (o.verbose < 10) o.verbose++;
log_write(LOG_STDOUT, "Verbosity Increased to %d.\n", o.verbose);
} else if (c == 'V') {
if (o.verbose > 0)
o.verbose--;
if (o.verbose > 0) o.verbose--;
log_write(LOG_STDOUT, "Verbosity Decreased to %d.\n", o.verbose);
} else if (c == 'd') {
o.debugging++;
if (o.debugging < 10) o.debugging++;
log_write(LOG_STDOUT, "Debugging Increased to %d.\n", o.debugging);
} else if (c == 'D') {
if (o.debugging > 0) o.debugging--;