Chapter 8: Working with Nmap Scanner

This chapter covers how network scanning is done with Python nmap as a wrapper for Nmap to gather information on a network, host, and the services that are running on that host. Python nmap provides a specific module to take more control of the process of scanning a network to detect open ports and exposed services in specific machines or servers. Hence, understanding it is crucial.

We will start with an introduction to Nmap as a port scanner that allows you to identify open, closed, or filtered ports. I will then explain how Python nmap works for synchronous and asynchronous scanning. Also, we will see how nmap works with the os and subprocess modules. Finally, we will cover programming with nmap scripts ...

Get Mastering Python for Networking and Security - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.