使用Python获取网段IP个数以及地址清单的方法(python遍历网段ip)

from IPy import IP

ip = IP('192.168.0.0/16')

print(ip.len())

for x in ip:
    print(x)

转:https://www.zhiu.cn/54354.html

posted @ 2023-03-16 16:07  rmticocean  阅读(283)  评论(0)    收藏  举报