1
Nitroethane 2020-01-09 18:19:56 +08:00 via iPhone
Python 3 的 ipaddress 标准库试一下
|
2
ysc3839 2020-01-09 18:35:15 +08:00
|
3
Jackyxiaoc OP |
4
ysc3839 2020-01-09 18:52:43 +08:00
@Jackyxiaoc 怎么个用不了?我试了把 "-" 替换成 "," 没问题呀?
|
5
xupefei 2020-01-09 18:55:54 +08:00 via iPhone 1
可以自己写哇。
把数字当成 bit 位,统计一下相同的 bit 有多少位就行了 |
6
Jackyxiaoc OP |
7
jswxg 2020-01-13 12:20:31 +08:00
就让你做个伸手党吧~~
1.0.0.0/24 1.0.4.0/22 1.0.16.0/20 1.0.64.0/18 1.0.128.0/17 1.1.1.0/24 1.1.64.0/18 1.1.128.0/17 1.2.3.0/24 1.2.128.0/17 1.4.0.0/24 1.4.128.0/17 1.5.0.0/16 1.6.0.0/15 1.9.0.0/16 1.10.10.0/24 1.10.128.0/17 1.11.0.0/16 1.16.0.0/13 1.32.0.0/13 1.40.0.0/14 1.44.0.0/16 1.46.0.0/15 1.52.0.0/14 1.64.0.0/14 1.72.0.0/13 1.96.0.0/12 1.112.0.0/14 1.120.0.0/13 1.128.0.0/11 1.160.0.0/12 1.176.0.0/14 1.186.0.0/15 1.200.0.0/15 1.208.0.0/12 1.224.0.0/11 2.0.0.0/7 4.0.0.0/6 8.0.0.0/7 11.0.0.0/8 12.0.0.0/7 14.0.8.0/22 14.0.16.0/20 14.0.32.0/19 14.0.64.0/18 14.0.128.0/17 14.1.4.0/22 14.1.8.0/21 14.1.16.0/21 14.1.28.0/22 14.1.32.0/19 14.1.64.0/19 14.1.100.0/22 14.1.104.0/22 14.1.112.0/20 14.1.128.0/17 14.2.0.0/15 14.4.0.0/14 14.8.0.0/13 14.32.0.0/11 14.64.0.0/11 14.96.0.0/14 14.100.0.0/15 14.102.0.0/17 14.102.132.0/22 14.102.136.0/21 14.102.144.0/21 14.102.152.0/22 14.102.160.0/20 14.102.176.0/22 14.102.184.0/21 14.102.192.0/18 14.128.0.0/15 14.132.0.0/15 14.136.0.0/13 14.160.0.0/11 14.192.0.0/19 14.192.32.0/20 14.192.48.0/21 14.192.56.0/22 14.192.64.0/21 14.192.72.0/22 14.192.80.0/20 14.192.96.0/19 14.192.128.0/17 14.193.0.0/16 14.194.0.0/15 14.198.0.0/15 14.200.0.0/14 14.206.0.0/15 14.224.0.0/11 15.0.0.0/8 16.0.0.0/5 24.0.0.0/7 26.0.0.0/8 27.0.0.0/17 27.0.136.0/21 27.0.144.0/20 27.0.168.0/21 27.0.176.0/21 27.0.184.0/22 27.0.192.0/21 27.0.200.0/22 27.0.216.0/21 27.0.224.0/19 27.1.0.0/16 27.2.0.0/15 27.4.0.0/14 27.32.0.0/15 27.34.0.0/17 27.34.128.0/18 27.34.192.0/19 27.34.224.0/21 27.34.240.0/20 27.35.0.0/16 27.48.0.0/15 27.50.0.0/19 27.50.32.0/21 27.50.48.0/20 27.50.64.0/18 27.51.0.0/16 27.52.0.0/15 27.54.0.0/18 27.54.64.0/21 27.54.80.0/20 27.54.96.0/19 27.54.128.0/20 27.54.144.0/21 27.54.160.0/19 27.55.0.0/16 27.56.0.0/13 27.64.0.0/11 27.96.0.0/15 27.98.0.0/17 27.98.128.0/18 27.98.192.0/20 27.99.0.0/17 27.100.0.0/15 27.102.0.0/16 27.104.0.0/15 27.106.0.0/17 27.106.192.0/21 27.106.200.0/22 27.106.208.0/20 27.106.224.0/19 27.107.0.0/16 27.108.0.0/16 27.109.0.0/19 27.109.64.0/19 27.109.96.0/20 27.109.112.0/21 27.109.120.0/22 27.109.128.0/17 27.110.0.0/15 27.112.64.0/20 27.112.96.0/20 27.112.120.0/21 27.112.128.0/17 27.113.0.0/17 27.113.192.0/18 27.114.0.0/16 27.115.128.0/17 27.116.0.0/19 27.116.32.0/21 27.116.40.0/22 27.116.48.0/20 27.116.64.0/18 27.116.128.0/17 27.117.0.0/16 27.118.0.0/15 27.120.0.0/16 27.121.0.0/18 27.121.64.0/21 27.121.80.0/20 27.121.96.0/20 27.121.112.0/21 27.121.128.0/17 27.122.0.0/16 27.123.0.0/17 27.123.128.0/18 27.123.192.0/19 27.123.224.0/21 27.123.236.0/22 27.123.240.0/20 27.124.0.0/14 27.130.0.0/16 27.131.0.0/17 27.131.128.0/18 27.131.192.0/20 27.131.208.0/21 27.131.216.0/22 27.131.224.0/19 27.132.0.0/14 27.136.0.0/13 27.145.0.0/16 27.146.0.0/15 27.160.0.0/12 27.176.0.0/13 27.228.0.0/14 27.232.0.0/13 27.240.0.0/12 28.0.0.0/6 32.0.0.0/6 36.0.4.0/22 |
8
Jackyxiaoc OP @jswxg 哈哈 谢谢大佬
|