Skip to content

A tool for expressing IPv4 addresses in binary and decimal numbers.

License

Notifications You must be signed in to change notification settings

kumarstack55/python-ipv4calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-ipv4calc

A tool for expressing IPv4 addresses in binary and decimal numbers.

Requirements

  • Python 3.3+
  • Poetry 1.1+

Installation

git clone https://github.com/kumarstack55/python-ipv4calc.git
cd python-ipv4calc
poetry install

Usage

PS > poetry run ipv4calc 192.168.0.1/24
address          : 192.168.0.1
network          : 192.168.0.0
netmask          : 255.255.255.0
broadcast        : 192.168.0.255
addressPrefix    : 24
numAddresses     : 256
addressBinary    : 11000000.10101000.00000000.00000001
networkBinary    : 11000000.10101000.00000000.00000000
netmaskBinary    : 11111111.11111111.11111111.00000000
broadcastBinary  : 11000000.10101000.00000000.11111111
addressDecimal   : 3232235521
networkDecimal   : 3232235520
netmaskDecimal   : 4294967040
broadcastDecimal : 3232235775
PS > poetry run ipv4calc -h
usage: ipv4calc [-h] ipaddr_prefix

positional arguments:
  ipaddr_prefix  192.168.0.1/24 or 192.168.0.1 or 3232235521.

optional arguments:
  -h, --help     show this help message and exit

License

MIT

About

A tool for expressing IPv4 addresses in binary and decimal numbers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages