From d6c9e19a2c78098167bc7cb7503cf280a762a20f Mon Sep 17 00:00:00 2001 From: david Date: Sun, 19 Jul 2009 05:13:07 +0000 Subject: [PATCH] Add -Pn and -sn synonyms for -PN and -sP respectively. --- nmap.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nmap.cc b/nmap.cc index af64fe866..6ccaa071a 100644 --- a/nmap.cc +++ b/nmap.cc @@ -1137,7 +1137,7 @@ int nmap_main(int argc, char *argv[]) { o.pingtype |= PINGTYPE_ICMP_MASK; else if (*optarg == 'P') o.pingtype |= PINGTYPE_ICMP_TS; - else if (*optarg == '0' || *optarg == 'N' || *optarg == 'D') + else if (*optarg == 'n' || *optarg == '0' || *optarg == 'N' || *optarg == 'D') o.pingtype = PINGTYPE_NONE; else if (*optarg == 'R') o.pingtype |= PINGTYPE_ARP; @@ -1250,6 +1250,10 @@ int nmap_main(int argc, char *argv[]) { p = optarg; while(*p) { switch(*p) { + case 'n': + case 'P': + o.noportscan = 1; + break; case 'A': o.ackscan = 1; break; case 'B': fatal("No scan type 'B', did you mean bounce scan (-b)?"); break; #ifndef NOLUA @@ -1260,7 +1264,6 @@ int nmap_main(int argc, char *argv[]) { case 'M': o.maimonscan = 1; break; case 'N': o.nullscan = 1; break; case 'O': o.ipprotscan = 1; break; - case 'P': o.noportscan = 1; break; case 'R': o.rpcscan = 1; break; case 'S': o.synscan = 1; break; case 'T': o.connectscan = 1; break;