How it works...

The options mentioned in this recipe help users to select targets at their convenience, irrespective of the size of their network or the provided list of hosts. Nmap does not require users to enter the final list of host to be scanned. Instead, as shown in this recipe, it provides various options to dynamically allow Nmap to select the targets based on various filters. The file-based filters allow Nmap to input a readily available list of hosts to be scanned, thereby reducing the effort required for customizations or formatting the lists. 

Get Network Scanning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.