Scan modes with python-nmap

In this section we review the scan modes supported in the python-nmap module. python-nmap allows for the automation of port scanner tasks and reports in two modes: synchronous and asynchronous. With the asynchronous mode, we can define a callback function that will execute when a scan is finished in a specific port and, in this function, we can make additional treatments if the port is opened, such as launching an Nmap script for a specific service (HTTP, FTP, MySQL).

Get Mastering Python for Networking and Security 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.