Python 3: create a list of possible ip addresses from a CIDR notation
In Python 3 as simple as >>> import ipaddress >>> [str(ip) for ip in ipaddress.IPv4Network(‘192.0.2.0/28’)] [‘192.0.2.0’, ‘192.0.2.1’, ‘192.0.2.2’, ‘192.0.2.3’, ‘192.0.2.4’, ‘192.0.2.5’, ‘192.0.2.6’, ‘192.0.2.7’, ‘192.0.2.8’, ‘192.0.2.9’, ‘192.0.2.10’, ‘192.0.2.11’, ‘192.0.2.12’, ‘192.0.2.13’, ‘192.0.2.14’, ‘192.0.2.15’]