A Python library that optimizes network scanning by combining Masscan's speed with Nmap's detailed analysis for efficient vulnerability assessment.
An optimized way to use Masscan and Nmap with Python
This tool is designed for security professionals and network administrators who need to perform fast and accurate port scanning and vulnerability detection. It automates the process of using Masscan to quickly identify open ports and then runs detailed Nmap scans on those ports to gather comprehensive information, saving time and resources during network security assessments.
This tool requires Masscan and Nmap to be installed and accessible on the system. Running scans may require elevated privileges (e.g., sudo). Proper network permissions and legal authorization are necessary before scanning any hosts. The tool is optimized for Linux environments and Python 3. Compatibility with other OSes or Python versions is not explicitly stated.
pip install netifaces
pip install python-nmap
pip install python-masscan
sudo /bin/python3 example.py
Runs the example script demonstrating the combined Masscan and Nmap scanning process.
masscanProcess('<host_ip_or_dns>')
Executes a Masscan scan on the specified host with a max rate of 1000 and adapter IP, returning open ports and scan data.
nmapFastScanProcess('<host_ip_or_dns>')
Performs a fast Nmap scan with aggressive options (-A -T5) on the specified host, returning open ports and detailed scan data.