tom@iMac: curl subnet.im/192.168.0.1/23 { "ip": "192.168.0.1", "netmask": "255.255.254.0", "cidr": 23, "wildcard": "0.0.1.255", "network": "192.168.0.0", "broadcast": "192.168.1.255", "firsthost": "192.168.0.1", "lasthost": "192.168.1.254", "totalhosts": 510 }%
Python example :)
>>> r = requests.get('http://subnet.im/192.168.12.12/30') >>> print(r.text) { "ip": "192.168.12.12", "netmask": "255.255.255.252", "cidr": 30, "wildcard": "0.0.0.3", "network": "192.168.12.12", "broadcast": "192.168.12.15", "firsthost": "192.168.12.13", "lasthost": "192.168.12.14", "totalhosts": 2 }
Loads still to do, main one would be IPv6... However comments/ideas are always appreciated.