GPEN · Question #198
You want to run the nmap command that includes the host specification of 202.176.56-57.*. How many hosts will you scan?
The correct answer is C. 512. The range 56-57 in the third octet yields 2 values and the wildcard in the fourth octet yields 256 values, totaling 512 hosts.
Question
You want to run the nmap command that includes the host specification of 202.176.56-57.*. How many hosts will you scan?
Options
- A1024
- B256
- C512
- D64
How the community answered
(28 responses)- A11% (3)
- B11% (3)
- C75% (21)
- D4% (1)
Why each option
The range 56-57 in the third octet yields 2 values and the wildcard in the fourth octet yields 256 values, totaling 512 hosts.
1024 would require four values across the specified octet range multiplied by 256, which does not match the 56-57 range.
256 would be correct only if a single value were specified in the third octet rather than a two-value range.
Nmap's range notation 56-57 specifies two discrete values for the third octet (56 and 57). The wildcard (*) in the fourth octet represents all 256 values from 0 to 255. Multiplying 2 by 256 gives exactly 512 hosts to be scanned across the two /24-equivalent ranges.
64 does not correspond to any valid arithmetic result from the given host specification.
Concept tested: Nmap host range specification and scan count calculation
Source: https://nmap.org/book/man-target-specification.html
Topics
Community Discussion
No community discussion yet for this question.