Generate all numbers from 1.1.1.1 to 255.255.255.255 [closed]

Python 3 has the ipaddress module:

import ipaddress
for address in range(0x01010101, 0xffffffff):
    print(ipaddress.IPv4Address(address))

Leave a Comment