Exscript.util.ip module¶
Wrapper around the ipv4 and ipv6 modules to handle both, ipv4 and ipv6.
-
Exscript.util.ip.
clean_ip
(ip)[source]¶ Cleans the ip address up, useful for removing leading zeros, e.g.:
192.168.010.001 -> 192.168.10.1 1234:0000:0000:0000:0000:0000:0000:000A -> 1234::a
Parameters: ip (string) – An IP address. Return type: string Returns: The cleaned up IP.