Get various information of an IPv4
Go to file
Marco Cetica bb2a2833d1
Removed IP classes because they're obsolete
2023-11-11 17:03:16 +01:00
LICENSE First upload 2023-11-11 16:20:22 +01:00
README.md Removed IP classes because they're obsolete 2023-11-11 17:03:16 +01:00
subnet.py Removed IP classes because they're obsolete 2023-11-11 17:03:16 +01:00

README.md

subnet.py

CLI tool to determine various information of a given IPv4 address in CIDR format.

Installation

This program is written in Python using only the builtin libraries, you can move it wherever you like and invoke it from there.

Usage

Run the program without any parameter, the helper will walk you through on how to use it. For example:

$> ./subnet.py 10.0.3.4/24
IP Address: 10.0.3.4 (00001010 00000000 00000011 00000100)
Subnet Mask: 255.255.255.0 (11111111 11111111 11111111 00000000)
Network Prefix: 10.0.3.0 (00001010 00000000 00000011 00000000)
Host Prefix: 0.0.0.4 (00000000 00000000 00000000 00000100)
Usable Hosts: 254