ungleich-learning-circle/kjg/IPv6/ula/ularegistry/checkip.py

14 lines
237 B
Python
Raw Normal View History

2020-07-30 14:15:52 +00:00
import ipaddress
def overlapip(ip1, ip2):
test1 = ipaddress.IPv6Network(ip1).overlaps(ipaddress.IPv6Network(ip2))
if test1 :
print("overlap")
return 0
else:
print("no overlap")
return 1