1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Catch unsupported -P options for those that don't take a port argument

This commit is contained in:
dmiller
2023-05-09 14:16:46 +00:00
parent f0ae60142a
commit aedf179178

View File

@@ -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");