Python And Ip Range?
For example, I have a file ( city and ip addresses ): .... City1 31.25.87.0 - 31.25.87.15 .... .... City2 31.47.224.0 - 31.47.255.255 .... How to know by ip adress city na
Solution 1:
http://www.icir.org/robin/pysubnettree/
you may need to convert ip ranges in cidr, so this library can help you
http://code.google.com/p/python-iptools/
Please consider that converting ip ranges to cidrs you may have multiple cidr blocks so you have to repeat the city in the tree
Post a Comment for "Python And Ip Range?"