1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-08 07:29:03 +00:00

Add -Pn and -sn synonyms for -PN and -sP respectively.

This commit is contained in:
david
2009-07-19 05:13:07 +00:00
parent 82a668c278
commit d6c9e19a2c

View File

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