From a3391d5401e17897fed113b63adc869cf86f86db Mon Sep 17 00:00:00 2001 From: david Date: Fri, 17 Jul 2009 23:46:14 +0000 Subject: [PATCH] Remove the prohibition against using -PN and -sP together. This is the currently recommended way to disable both host discovery and port scanning. The only other phase that can run in the absence of these two is NSE, and then with host scripts only. -sP should not by thought of as "ping scan" but as "don't port scan," because more than a ping scan can happen when you use it. More reasonable and mnemonic options for disabling these phases will be forthcoming. --- NmapOps.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/NmapOps.cc b/NmapOps.cc index 5bd5983e8..74f1724fa 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -385,10 +385,6 @@ void NmapOps::ValidateOptions() { fatal("Sorry, the IPProtoscan (-sO) must currently be used alone rather than combined with other scan types."); } - if ((noportscan && pingtype == PINGTYPE_NONE && !listscan)) { - fatal("-PN (skip ping) is incompatable with -sP (ping scan). If you only want to enumerate hosts, try list scan (-sL)"); - } - if (noportscan && (TCPScan() || UDPScan() || SCTPScan() || ipprotscan)) { fatal("-sL and -sP (skip port scan) are not valid with any other scan types"); }