4 ms·
I keep telling myself I'm going to make a command line tool to do just this kind of thing and upload it to pypi. One day.
by ytjohn 11y ago
I keep telling myself I'm going to make a command line tool to do just this kind of thing and upload it to pypi. One day.
- deleted 11y ago[deleted]
- iSloth 11y agoI've actually got a curl output if you prefer command line... 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 }
- ytjohn 11y agoThanks!