Which switch tells Nmap to scan all possible ports from 1 to 65535?

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

Which switch tells Nmap to scan all possible ports from 1 to 65535?

Explanation:
To scan every possible port, you need a switch that specifies the full port range. In Nmap, -p- means scan all ports from 1 through 65535. This is the exact coverage you’re asking for, and it’s useful when you want a complete picture of what services might be listening on any port, though it will take longer than more targeted scans. Other options behave differently: -F performs a fast scan of the top 100 ports, not the full range; -p80 targets only port 80, so it misses everything else; -sV is about detecting the versions of services after a port is found, not about which ports to scan. So -p- is the right choice for exhaustive port scanning. If you prefer a fully explicit form, you could also use -p1-65535.

To scan every possible port, you need a switch that specifies the full port range. In Nmap, -p- means scan all ports from 1 through 65535. This is the exact coverage you’re asking for, and it’s useful when you want a complete picture of what services might be listening on any port, though it will take longer than more targeted scans.

Other options behave differently: -F performs a fast scan of the top 100 ports, not the full range; -p80 targets only port 80, so it misses everything else; -sV is about detecting the versions of services after a port is found, not about which ports to scan. So -p- is the right choice for exhaustive port scanning. If you prefer a fully explicit form, you could also use -p1-65535.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy