mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Catch unsupported -P options for those that don't take a port argument
This commit is contained in:
parent
f0ae60142a
commit
aedf179178
1 changed files with 3 additions and 0 deletions
3
nmap.cc
3
nmap.cc
|
|
@ -1131,6 +1131,9 @@ void parse_options(int argc, char **argv) {
|
|||
else {
|
||||
char buf[4] = "P\0";
|
||||
buf[1] = *optarg;
|
||||
if (*(optarg + 1) != '\0' && NULL == strchr("STAUYBO", *optarg)) {
|
||||
fatal("Unknown -P option -P%s.", optarg);
|
||||
}
|
||||
switch (*optarg) {
|
||||
case 'I':
|
||||
delayed_options.warn_deprecated(buf, "PE");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue