GPEN · Question #341
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 A. 512. The nmap specification 202.176.56-57.* targets two values in the third octet (56 and 57) and all 256 values in the fourth octet via the wildcard, yielding 2 x 256 = 512 total 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
- A512
- B64
- C1024
- D256
How the community answered
(28 responses)- A86% (24)
- B7% (2)
- C4% (1)
- D4% (1)
Why each option
The nmap specification 202.176.56-57.* targets two values in the third octet (56 and 57) and all 256 values in the fourth octet via the wildcard, yielding 2 x 256 = 512 total hosts.
The range notation 56-57 specifies exactly 2 distinct values for the third octet, and the wildcard * expands to all 256 possible addresses (0-255) for the fourth octet. Multiplying these together yields 2 x 256 = 512 unique host addresses that nmap will attempt to scan.
64 does not result from any valid combination of the two-value third-octet range and a full wildcard fourth octet, and does not reflect how nmap expands range and wildcard notation.
1024 would require four values in one of the ranged octets or another combination not present in this specification, since only two values exist in the third octet.
256 would be correct only if the third octet held a single fixed value paired with a wildcard fourth octet, but the 56-57 range provides two values, which doubles the host count.
Concept tested: nmap host range and wildcard address specification
Source: https://nmap.org/book/man-target-specification.html
Topics
Community Discussion
No community discussion yet for this question.