|
@@ -658,11 +658,21 @@ class BaseAttack(metaclass=abc.ABCMeta):
|
|
|
"""
|
|
|
|
|
|
def is_invalid(ip_address_param: ipaddress.IPv4Address):
|
|
|
+ """
|
|
|
+ TODO FILL ME
|
|
|
+ :param ip_address_param:
|
|
|
+ :return:
|
|
|
+ """
|
|
|
return ip_address_param.is_multicast or ip_address_param.is_unspecified or ip_address_param.is_loopback or \
|
|
|
ip_address_param.is_link_local or ip_address_param.is_reserved or ip_address_param.is_private
|
|
|
|
|
|
# Generate a random IP from specific class
|
|
|
def generate_address(ip_class_param):
|
|
|
+ """
|
|
|
+ TODO FILL ME
|
|
|
+ :param ip_class_param:
|
|
|
+ :return:
|
|
|
+ """
|
|
|
if ip_class_param == "Unknown":
|
|
|
return ipaddress.IPv4Address(random.randint(0, 2 ** 32 - 1))
|
|
|
else:
|
|
@@ -704,10 +714,19 @@ class BaseAttack(metaclass=abc.ABCMeta):
|
|
|
"""
|
|
|
|
|
|
def is_invalid(ip_address: ipaddress.IPv6Address):
|
|
|
+ """
|
|
|
+ TODO FILL ME
|
|
|
+ :param ip_address:
|
|
|
+ :return:
|
|
|
+ """
|
|
|
return ip_address.is_multicast or ip_address.is_unspecified or ip_address.is_loopback or \
|
|
|
ip_address.is_link_local or ip_address.is_private or ip_address.is_reserved
|
|
|
|
|
|
def generate_address():
|
|
|
+ """
|
|
|
+ TODO FILL ME
|
|
|
+ :return:
|
|
|
+ """
|
|
|
return ipaddress.IPv6Address(random.randint(0, 2 ** 128 - 1))
|
|
|
|
|
|
ip_addresses = []
|