我如何在python网络中检查ipaddress范围

时间:2021-09-11 18:16:57

how can I find the addresses in python if I have given any IP s range dynamically . I want the range of address from one to another ip and also count the ports which are connected .If the n number of IP s connected

如果我动态地给出任何IP范围,我如何在python中找到地址。我想要从一个到另一个ip的地址范围,并计算连接的端口。如果连接了n个IP

1 个解决方案

#1


0  

To get all the ips combinations you can try to use the following code:

要获得所有ips组合,您可以尝试使用以下代码:

import itertools 

ips = itertools.product([193], [55,56], xrange(0,256), xrange(1, 256))

#1


0  

To get all the ips combinations you can try to use the following code:

要获得所有ips组合,您可以尝试使用以下代码:

import itertools 

ips = itertools.product([193], [55,56], xrange(0,256), xrange(1, 256))