From 90e464602a3629543578e86c651f99b1d8bb8d4b Mon Sep 17 00:00:00 2001 From: fyodor Date: Sat, 11 Aug 2007 03:19:43 +0000 Subject: [PATCH] merge soc07 r4768 - Don't print an error message when no ports are specified with list or ping scan. --- nmap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nmap.cc b/nmap.cc index cfd5093ed..890ed1d11 100644 --- a/nmap.cc +++ b/nmap.cc @@ -2031,7 +2031,7 @@ struct scan_lists *getpts(char *origexpr) { range_type, // Defaults to TCP/UDP/Protos &portwarning); // No, we haven't warned them about dup ports yet - if ( 0 == (ports->tcp_count + ports->udp_count + ports->prot_count)) + if (range_type != 0 && 0 == (ports->tcp_count + ports->udp_count + ports->prot_count)) fatal("No ports specified -- If you really don't want to scan any ports use ping scan..."); if (ports->tcp_count) {