2021-12-05 17:59:19 +00:00
|
|
|
import ipaddress
|
|
|
|
import random
|
|
|
|
|
|
|
|
v4_addr = ipaddress.IPv4Address(random.randint(0, 2**32))
|
2021-12-05 19:53:41 +00:00
|
|
|
v6_addr = ipaddress.IPv6Address(random.randint(0, 2**128))
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
addr_type = random.choice(["ipv6", "ipv4"])
|
|
|
|
if addr_type == "ipv6":
|