This code executes ping and port scans on individual or multiple IP ranges and port numbers. You must enter the IP address with a prefix and you can use (",") for multiple IP ranges for example 10.20.0.0/25,46.224.0.0/17 Also, you can use multiple ports for scanning and you have to use (",") for various ports for example 22,23,80,53 Finally, you must enter the CSV output file name and this file shows scanning output.
Input:
Output:
This code executes the output of 01.port_scan.py and gets information(such as device brand, hostname, model, serial number, and version)about the IPs on this file. If you have another input file, you can use your input. This code can execute on the IOS, IOS-XE, NX-OS, ASA, and FortiGate devices. If you use ports 22, 23, 80, and 443 on 01.port_scan.py, you don't need to modify this code and you can use this code easily.
Input:
Output: