mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 12:41:29 +00:00
Catch unsupported -P options for those that don't take a port argument
This commit is contained in:
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");
|
||||
|
||||
Reference in New Issue
Block a user