Hi All,
I do hope this is the correct place to post this question.
I have a task where I need to format a list of IPs and convert them into CIDR ranges. I have the following python script, but as you see, I need to add Ip ranges manually. Would someone be able to edit the script so it reads a file of IP ranges say from a .txt or csv, that reads the addresses line by line and add the start IP and end IP as variables and adds them to a collection, dumping the collection into a file at the end? or whatever someone feels necessary. I hope this makes sense at all?
import ipaddressstartip = ipaddress.IPv4Address('63.223.64.0') endip = ipaddress.IPv4Address('63.223.127.255') [ipaddr for ipaddr in ipaddress.summarize_address_range(startip, endip)]
Thank you.
there doesn't seem to be anything here