https://www.cnblogs.com/xingyunblog/p/9049356.html

https://blog.csdn.net/huanghelouzi/article/details/88411513

https://blog.csdn.net/jorson2000a/article/details/81461199

Python 计算两个IP段之间的有效IP地址

 

https://blog.csdn.net/qq_26711103/article/details/80320542

https://blog.csdn.net/qq_21127151/article/details/80140367

https://www.cnblogs.com/monsteryang/p/6700147.html

 

https://www.jb51.net/article/149951.htm

 

 

import os
import sys
from IPy import IP
FILE1=sys.argv[1]
f1=open(FILE1,”r”)
f2=open(“./ip.txt”,’a+’)
line1=f1.readlines()
for m in line1:
ip = IP(m)
for x in ip:
print >> f2,”%s” %x
————————————————
版权声明:本文为CSDN博主「吾王万岁万岁万万岁」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_26711103/article/details/80320542

 

 

还可以使用mysql函数,

SELECT
INET_ATON(
'127.0.0.1'
); 

SELECT
INET_NTOA(2130706433);
计算两个ip之间地址

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注