Example usage:
$ ./summarize.py 192.168.1.0 192.168.1.8
192.168.1.0/29
192.168.1.8
or alternatively as a python module:
>>> from summarize import summarize
>>> summarize('192.168.1.0', '192.168.1.254')
['192.168.1.0/25', '192.168.1.128/26', '192.168.1.192/27', '192.168.1.224/28', '192.168.1.240/29', '192.168.1.248/30', '192.168.1.252/31', '192.168.1.254']
The source for this script is available for download from the Wad of Stuff repository.
1 comment:
IPy is very nice. Glad to see another person using it too.
Post a Comment