mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
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.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user