This script offers an automated approach to extract unique IP addresses from .pcap files found in the current directory. After extraction, the IPs are saved into individual .csv files, and an Nmap scan is conducted on them.
- Python (3.x recommended)
- Nmap: Ensure
nmapis installed and available in your system's PATH. - WireShark
The following Python libraries are required:
- pyshark
- python-nmap
- ipaddress
- logging
- csv
- glob
- os
Install the required Python libraries with the following command:
pip install pyshark python-nmap- Place all your
.pcapfiles in the script's directory. - Run the script:
python main.py- The script will generate individual
.csvfiles for each.pcapfile containing unique IP addresses, and also an aggregated file namedall_unique_ips.csv. - After extraction, an Nmap scan will be performed on the IPs, and the results will be displayed.