How do you run a scan to display only open ports within a subset of ports (e.g., 80 and 443) using --open?

Prepare for the Nmap and ZenMap Tests. Access flashcards and multiple choice questions, with hints and explanations for each question. Ensure success in your exam!

Multiple Choice

How do you run a scan to display only open ports within a subset of ports (e.g., 80 and 443) using --open?

Explanation:
You want to focus the scan on a small set of ports and show only those that are open. The port selection is done with -p, so you specify 80 and 443. The --open option filters the results to display only ports that are open (and only hosts that have at least one open port in the scanned set). Put together, the command that exactly matches this goal is to scan ports 80 and 443 and then show only the ones that are open: nmap -p 80,443 --open. If you used a port range like 80-443, you’d be scanning many more ports, which isn’t what you want here. The order of the options doesn’t change the outcome in practice, but this arrangement clearly expresses the intent: limit to those two ports, then filter to just the open ones.

You want to focus the scan on a small set of ports and show only those that are open. The port selection is done with -p, so you specify 80 and 443. The --open option filters the results to display only ports that are open (and only hosts that have at least one open port in the scanned set). Put together, the command that exactly matches this goal is to scan ports 80 and 443 and then show only the ones that are open: nmap -p 80,443 --open.

If you used a port range like 80-443, you’d be scanning many more ports, which isn’t what you want here. The order of the options doesn’t change the outcome in practice, but this arrangement clearly expresses the intent: limit to those two ports, then filter to just the open ones.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy