my-ip-calulator


Namemy-ip-calulator JSON
Version 1.0.5 PyPI version JSON
download
home_pagehttps://brunobotelhobr.github.io/My-IP-Calculator
SummaryThis is an IPv4 and IPv6 calculator. It can validate IP address, convert then and also do net and subnet calculations.
upload_time2023-10-03 20:49:32
maintainerBruno Botelho
docs_urlNone
authorBruno Botelho
requires_python>=3.10,<4.0
licenseMIT
keywords ip calculator ipv4 ipv6 net subnet cidr mask address convert validate
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # My-IP-Calculator 

![Icon](https://brunobotelhobr.github.io/My-IP-Calculator/0.1.0/assets/logo.png)

![GitHub Action CI](https://github.com/brunobotelhobr/My-IP-Calculator/actions/workflows/ci.yml/badge.svg?branch=main)
![GitHub Action CodeQL](https://github.com/brunobotelhobr/My-IP-Calculator/actions/workflows/codeql.yml/badge.svg?branch=main)
![GitHub Action Trivy](https://github.com/brunobotelhobr/My-IP-Calculator/actions/workflows/trivy.yml/badge.svg?branch=main)
[![codecov](https://codecov.io/gh/brunobotelhobr/My-IP-Calculator/branch/main/graph/badge.svg?token=58zkdUzWkh)](https://codecov.io/gh/brunobotelhobr/My-IP-Calculator)

**This an IP address calculator.**

I'm a savy CyberSecurity professional, and the propose of this code is provide and an example and also incentivate my graduation students to develop tools and scripts in python to do defensive or ofensive security tasks.

Features:

 - Works with IPv6 and IPv4.
 - Convert address to decimal, hexadecimal and bnary form.
 - Valdiate addresses
 - Calculate nets (Broadcast, Network ID and avaliable host address)
 - Calculate Subnets

## Demo
[![asciicast](https://asciinema.org/a/585954.svg)](https://asciinema.org/a/585954)

## Install
You can use this tool in many ways:

### Install from Repository
With this command, you PC will download the app from https://pypi.org/project/my-ip-calulator/:
````
pip install my-ip-calc
````

[![asciicast](https://asciinema.org/a/585935.svg)](https://asciinema.org/a/585935)

### Run in Container
With this commands:
````
docker push brunobotelhobr/my-ip-calulator:latest
docker run --rm brunobotelhobr/my-ip-calulator:latest
````

[![asciicast](https://asciinema.org/a/585942.svg)](https://asciinema.org/a/585942)

### Build from Source Code
You mus have python installed.

````
pip install poetry

git clone https://github.com/brunobotelhobr/My-IP-Calculator.git
cd My-IP-Calculator
poetry shell
poetry install

# Testing
task test

# Run
python src/app/cmd.py
````

[![asciicast](https://asciinema.org/a/585958.svg)](https://asciinema.org/a/585958)

## How to use
General:

Usage: `my-ip-calculator [OPTIONS] COMMAND [ARGS]...`

Options:

    --install-completion          Install completion for the current shell.
    --show-completion             Show completion for the current shell, to copy it or customize the installation.
    --help                        Show this message and exit.

Commands:

    net        Calculate the network address from an IP address and a subnet mask, output the address in the desired format.
    subnet     Split an IP address into network and host parts, output the address in the desired format.
    val        Validate an IPv4 ou IPv6 address, output the address in the desired format.
    version    Show version.

### Version
Show the software version:
`````
my-ip-calculator version
0.0.2
`````

### Validate (Val)
Usage: `my-ip-calculator [OPTIONS] ADDRESS`

Validate an IPv4 ou IPv6 address, output the address in the desired format.    

Arguments

    *    address      TEXT  IP address, it supports IPv4 and IPv6 [default: None] [required]

Options

    --output  -o      [bin|hex|dec]  Output format for the network address details of an IP address, it supports bin, hex, dec. [default: None]
    --help                           Show this message and exit.

Examples

`````
my-ip-calculator val 10.10.10.10
               Address                
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Item    ┃ Value           ┃ Status ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ Version │ 4               │ ✅ OK  │
│ Address │ 010.010.010.010 │ ✅ OK  │
└─────────┴─────────────────┴────────┘

my-ip-calculator val 10.10.10.10 -o bin
                         Address                          
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Item    ┃ Value                               ┃ Status ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ Version │ 4                                   │ ✅ OK  │
│ Address │ 00001010.00001010.00001010.00001010 │ ✅ OK  │
└─────────┴─────────────────────────────────────┴────────┘

my-ip-calculator val 10.10.10.10 -o hex
             Address              
┏━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Item    ┃ Value       ┃ Status ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━┩
│ Version │ 4           │ ✅ OK  │
│ Address │ 0A.0A.0A.0A │ ✅ OK  │
└─────────┴─────────────┴────────┘

my-ip-calculator val 1:2:3:4:5:6:7:8
                           Address                            
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Item    ┃ Value                                   ┃ Status ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ Version │ 6                                       │ ✅ OK  │
│ Address │ 0001:0002:0003:0004:0005:0006:0007:0008 │ ✅ OK  │
└─────────┴─────────────────────────────────────────┴────────┘
my-ip-calculator  val 1:2:3::
                           Address                            
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Item    ┃ Value                                   ┃ Status ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ Version │ 6                                       │ ✅ OK  │
│ Address │ 0001:0002:0003:0000:0000:0000:0000:0000 │ ✅ OK  │
└─────────┴─────────────────────────────────────────┴────────┘

my-ip-calculator val A -o hex
                      Errors                      
┏━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Item    ┃ Value ┃ Message         ┃ Status     ┃
┡━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ address │ A     │ Invalid address │ ⛔ Invalid │
└─────────┴───────┴─────────────────┴────────────┘
`````

### Network (Net)
Usage: `my-ip-calculator net [OPTIONS] ADDRESS [MASK]`
Calculate the network address from an IP address and a subnet mask, output the address in the desired format.
if a mask isn't provided:

- For IPv4 it will provide a mask based on the adress class: A, B,C,D and E
- For IPv6 a standart /64 will be provided.

Arguments

    *   address      TEXT    IP address, it supports IPv4 and IPv6. [default: None] [required]
        mask         [MASK]  IP address mask, if not provided an auto generated one will be assigned. [default:None]

Options

    --output  -o      [bin|hex|dec]  Output format for the network address details of an IP address, it supports bin, hex, dec. [default:None]
    --help                           Show this message and exit.

Examples
````
my-ip-calculator net 192.168.0.1
                 Network                  
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Item        ┃ Value           ┃ Status ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ Version     │ 4               │ ✅ OK  │
│ Address     │ 192.168.000.001 │ ✅ OK  │
│ Mask        │ 255.255.255.000 │ ✅ OK  │
│ Network     │ 192.168.000.000 │ ✅ OK  │
│ Broadcast   │ 192.168.000.255 │ ✅ OK  │
│ Hosts (dec) │ 254             │ ✅ OK  │
└─────────────┴─────────────────┴────────┘

my-ip-calculator net 192.168.0.1 16
                 Network                  
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Item        ┃ Value           ┃ Status ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ Version     │ 4               │ ✅ OK  │
│ Address     │ 192.168.000.001 │ ✅ OK  │
│ Mask        │ 255.255.000.000 │ ✅ OK  │
│ Network     │ 192.168.000.000 │ ✅ OK  │
│ Broadcast   │ 192.168.255.255 │ ✅ OK  │
│ Hosts (dec) │ 65534           │ ✅ OK  │
└─────────────┴─────────────────┴────────┘

my-ip-calculator net 192.168.0.1 16 -o hex
               Network                
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Item        ┃ Value       ┃ Status ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━┩
│ Version     │ 4           │ ✅ OK  │
│ Address     │ C0.A8.00.01 │ ✅ OK  │
│ Mask        │ FF.FF.00.00 │ ✅ OK  │
│ Network     │ C0.A8.00.00 │ ✅ OK  │
│ Broadcast   │ C0.A8.FF.FF │ ✅ OK  │
│ Hosts (dec) │ 65534       │ ✅ OK  │
└─────────────┴─────────────┴────────┘

my-ip-calculator net 192.168.0.1 16 -o bin
                           Network                            
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Item        ┃ Value                               ┃ Status ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ Version     │ 4                                   │ ✅ OK  │
│ Address     │ 11000000.10101000.00000000.00000001 │ ✅ OK  │
│ Mask        │ 11111111.11111111.00000000.00000000 │ ✅ OK  │
│ Network     │ 11000000.10101000.00000000.00000000 │ ✅ OK  │
│ Broadcast   │ 11000000.10101000.11111111.11111111 │ ✅ OK  │
│ Hosts (dec) │ 65534                               │ ✅ OK  │
└─────────────┴─────────────────────────────────────┴────────┘

my-ip-calculator  net 1:2:3:4:5:6:A:B -o hex
                             Network                              
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Item        ┃ Value                                   ┃ Status ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ Version     │ 6                                       │ ✅ OK  │
│ Address     │ 0001:0002:0003:0004:0005:0006:000A:000B │ ✅ OK  │
│ Mask        │ FFFF:FFFF:FFFF:FFFF:0000:0000:0000:0000 │ ✅ OK  │
│ Network     │ 0001:0002:0003:0004:0000:0000:0000:0000 │ ✅ OK  │
│ Broadcast   │ 0001:0002:0003:0004:FFFF:FFFF:FFFF:FFFF │ ✅ OK  │
│ Hosts (dec) │ 18446744073709551614                    │ ✅ OK  │
└─────────────┴─────────────────────────────────────────┴────────┘

my-ip-calculator net 1:2:3:4:5:6:A:B 96 -o hex
                             Network                              
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Item        ┃ Value                                   ┃ Status ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ Version     │ 6                                       │ ✅ OK  │
│ Address     │ 0001:0002:0003:0004:0005:0006:000A:000B │ ✅ OK  │
│ Mask        │ FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:0000:0000 │ ✅ OK  │
│ Network     │ 0001:0002:0003:0004:0005:0006:0000:0000 │ ✅ OK  │
│ Broadcast   │ 0001:0002:0003:0004:0005:0006:FFFF:FFFF │ ✅ OK  │
│ Hosts (dec) │ 4294967294                              │ ✅ OK  │
└─────────────┴─────────────────────────────────────────┴────────┘

my-ip-calculator net 12:A:Z:: -o hex  
                                       Errors                                       
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Item    ┃ Value                                   ┃ Message         ┃ Status     ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ address │ 0012:000A:000Z:0000:0000:0000:0000:0000 │ Invalid address │ ⛔ Invalid │
└─────────┴─────────────────────────────────────────┴─────────────────┴────────────┘

my-ip-calculator net Z -o hex  
                      Errors                      
┏━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Item    ┃ Value ┃ Message         ┃ Status     ┃
┡━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ address │ A     │ Invalid address │ ⛔ Invalid │
└─────────┴───────┴─────────────────┴────────────┘
````

### Subnet
Usage: `cmd.py subnet [OPTIONS] ADDRESS MASK PARTS`

Split an IP address into network and host parts, output the address in the desired format.

Arguments 

    *    address      TEXT     IP address, it supports IPv4 and IPv6. [default: None][required]
    *    mask         TEXT     IP address mask. [default: None] [required]│
    *    parts        INTEGER  Split the netork into this parts. [default: None] [required]│

Options

    --output  -o      TEXT  Output format for the network address details of an IP address, it supports bin, hex, dec. [default: None]
    --help                  Show this message and

Examples
````
my-ip-calculator  subnet 192.168.0.1 8 8
                                        Networks
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Version ┃ Network         ┃ Mask            ┃ Broadcast       ┃ Hosts (dec) ┃ Status ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━┩
│ 4       │ 192.168.000.000 │ 255.255.000.000 │ 192.168.255.255 │ 65534       │ ✅ OK  │
│ 4       │ 192.169.000.000 │ 255.255.000.000 │ 192.169.255.255 │ 65534       │ ✅ OK  │
│ 4       │ 192.170.000.000 │ 255.255.000.000 │ 192.170.255.255 │ 65534       │ ✅ OK  │
│ 4       │ 192.171.000.000 │ 255.255.000.000 │ 192.171.255.255 │ 65534       │ ✅ OK  │
│ 4       │ 192.172.000.000 │ 255.255.000.000 │ 192.172.255.255 │ 65534       │ ✅ OK  │
│ 4       │ 192.173.000.000 │ 255.255.000.000 │ 192.173.255.255 │ 65534       │ ✅ OK  │
│ 4       │ 192.174.000.000 │ 255.255.000.000 │ 192.174.255.255 │ 65534       │ ✅ OK  │
│ 4       │ 192.175.000.000 │ 255.255.000.000 │ 192.175.255.255 │ 65534       │ ✅ OK  │
└─────────┴─────────────────┴─────────────────┴─────────────────┴─────────────┴────────┘

my-ip-calculator subnet 192.168.0.1 8 8 -o hex
                                  Networks
┏━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Version ┃ Network     ┃ Mask        ┃ Broadcast   ┃ Hosts (dec) ┃ Status ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━┩
│ 4       │ C0.A8.00.00 │ FF.FF.00.00 │ C0.A8.FF.FF │ 65534       │ ✅ OK  │
│ 4       │ C0.A9.00.00 │ FF.FF.00.00 │ C0.A9.FF.FF │ 65534       │ ✅ OK  │
│ 4       │ C0.AA.00.00 │ FF.FF.00.00 │ C0.AA.FF.FF │ 65534       │ ✅ OK  │
│ 4       │ C0.AB.00.00 │ FF.FF.00.00 │ C0.AB.FF.FF │ 65534       │ ✅ OK  │
│ 4       │ C0.AC.00.00 │ FF.FF.00.00 │ C0.AC.FF.FF │ 65534       │ ✅ OK  │
│ 4       │ C0.AD.00.00 │ FF.FF.00.00 │ C0.AD.FF.FF │ 65534       │ ✅ OK  │
│ 4       │ C0.AE.00.00 │ FF.FF.00.00 │ C0.AE.FF.FF │ 65534       │ ✅ OK  │
│ 4       │ C0.AF.00.00 │ FF.FF.00.00 │ C0.AF.FF.FF │ 65534       │ ✅ OK  │
└─────────┴─────────────┴─────────────┴─────────────┴─────────────┴────────┘

my-ip-calculator subnet A:B:C:D:E:: 96 16 -o dec
                                                                                        Networks                                                                                        
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Version ┃ Network                                         ┃ Mask                                            ┃ Broadcast                                       ┃ Hosts (dec) ┃ Status ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━┩
│ 6       │ 00010:00011:00012:00013:00014:00000:00000:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00000:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00001:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00001:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00002:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00002:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00003:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00003:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00004:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00004:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00005:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00005:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00006:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00006:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00007:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00007:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00008:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00008:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00009:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00009:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00010:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00010:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00011:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00011:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00012:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00012:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00013:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00013:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00014:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00014:65535 │ 65534       │ ✅ OK  │
│ 6       │ 00010:00011:00012:00013:00014:00000:00015:00000 │ 65535:65535:65535:65535:65535:65535:65535:00000 │ 00010:00011:00012:00013:00014:00000:00015:65535 │ 65534       │ ✅ OK  │
└─────────┴─────────────────────────────────────────────────┴─────────────────────────────────────────────────┴─────────────────────────────────────────────────┴─────────────┴────────┘
````

## About this code
It uses Poetry for dependency management and includes pre-configured tools such as black, flake8, mypy, pylint, pytest, and others, for formatting, linting, testing, and documentation management. 
The project also includes security tools like trivy and bandit. 

The pyproject.toml file contains various configurations like project metadata, dependencies, build system, and commands for release and documentation management.

To have more details, check the [Documentation](https://brunobotelhobr.github.io/My-IP-Calculator/)

## Features
- Project Management
    - ✅ [Poetry](https://python-poetry.org/docs/)
    - ✅ Script to manage project metadata (Name, Version, Description, etc)
    - ✅ Script to Upgrade all dependencies
    - ✅ Script to clean all temporary files
- Code Formatting
    - ✅ [Black](https://github.com/psf/black)
    - ✅ [isort](https://pycqa.github.io/isort/)
    - ✅ [autoflake](https://github.com/myint/autoflake)  
- Code Linting
    - ✅ [Pylint](https://www.pylint.org/)
    - ✅ [Flake8](https://flake8.pycqa.org/en/latest/)
    - ✅ [Mypy](https://mypy.readthedocs.io/en/stable/)
- Testing
    - ✅ [Pytest](https://docs.pytest.org/en/stable/)
    - ✅ [Coverage](https://coverage.readthedocs.io/en/coverage-5.5/)
    - ✅ Default tests structure folder for unit and functional tests
- Security
    - ✅ [Trivy](https://aquasecurity.github.io/trivy/v0.40/getting-started/installation/)
    - ✅ [Bandit](https://pypi.org/project/bandit/)
    - ✅ [Horusec](https://horusec.io/docs/quick-start/installation/)
- Autoamtion commands
    - ✅ [Taskipy](https://github.com/taskipy/taskipy)
- PyPI
    - ✅ Scripts to build and publish to PyPI
- Docker
    - ✅ Scripts to build and publish to Docker Hub
- Documentation
    - ✅ [MkDocs](https://www.mkdocs.org/)
    - ✅ [MkDocs Material Theme](https://squidfunk.github.io/mkdocs-material/)
    - ✅ [MkDocs Versioning with mike](https://github.com/jimporter/mike)
    - ✅ Scripts to generate SBOM (Software Bill of Materials)
    - ✅ Scripts to generate requirements.txt
- CI/CD
    - ✅ GitHub Actions to do CI/CD


## Tasks
This project uses [Taskipy](https://github.com/taskipy/taskipy) to automate common development tasks.

All tasks are defined in the `pypoject.toml` file.

Almost all tools used in this project uses `pyproject.toml` to store their configurations.

List of preset tasks:
````
pre-commit      Run all pre-commit tasks
pre-release     Run all pre-release tasks
-----------     ----------------------------------------
info            Show project info
meta            Update project properties
upgrade         Upgrade all dependencies
sec             Run all security checks
format          Run all formaters
lint            Run all linters
bom             Generate BOM
req             Generate requirements.txt
test            Run all tests
pypi-build      Build package for PyPI
pypi-auth       Authenticate to PyPI
pypi-pub        Publish package to PyPI
docker-list     List docker images
docker-build    Build docker image
docker-sec-scan Scan a docker image looking for vulenrabilities
docker-auth     Authenticate to Docker Hub
docker-latest   Tag a docker image as latest
docker-pub      Publish docker image to Docker Hub
docs            Run docs server
docs-list       List docs versions
docs-build      Add a new version to docs
docs-delete     Delete a version of the docs
docs-latest     Set the latest Version.
docs-purge      Purge all versions of the docs.
docs-pub        Publish documentation to the doc branch on GitHub.
clean           Clean all generated files
````

## Requirements
You must install manually the following tools:

- Install [Python](https://www.python.org/downloads/)
- Install [Poetry](https://python-poetry.org/docs/#installation)
- Install [Trivy](https://aquasecurity.github.io/trivy/v0.40/getting-started/installation/)
- Install [Horusec](https://horusec.io/docs/quick-start/installation/)
- Install [Docker](https://docs.docker.com/get-docker/)

Be sure you have installed all the requirements and that you on the desired python Version, you can check it with: 
    `python --version`

## Setup
```shell
# Clone the repository
git clone https://github.com/brunobotelhobr/My-IP-Calculator.git

# Check the python version, you must use the version that the project will use.
python -V

# Install the dependencies
pip install poetry
poetry shell
poetry install

# Check the taskipi commands:
task --list

# Update projetct metadata
task meta
```

## How Start?

### 1. Fork the project
```shell
# Clone the repository
git clone

# Check the python version, you must use the version that the project will use.
python -V

# Install the dependencies
pip install poetry
poetry shell
poetry install

# Check the taskipi commands:
task --list
```

### 2. Create a new branch with your changes
```shell
# Create a new branch
git checkout -b <branch-name>
```

### 3. Make the changes and commit
```shell
# Check for lint errors
task format
task lint

# Check for security errors
task sec

# Update the meta
task meta
task bom
task req

# Add the changes
git add .
```

### 4. Open a Pull Request
```shell
git commit -m "feat: add a new feature"
git push origin <branch-name>
```

## Hints
- How add a Dev Package
   -  `poetry add --dev <package-name>`
- How add a Prod Package
    - `poetry add <package-name>`
- How add a Package with extras
    - `poetry add <package-name> -E <extras>`
- How remove a Package
    - `poetry remove <package-name>`

## Call for Contributors
We invite you to contribute to this repository and help us make it even better. 
Whether it's bug fixes, new features, or documentation improvements, we welcome all contributions. 
Please read our documentation for guidelines on how to contribute. 
Happy coding!

check the [Documentation](https://brunobotelhobr.github.io/My-IP-Calculator/) for more details.

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/brunobotelhobr)


            

Raw data

            {
    "_id": null,
    "home_page": "https://brunobotelhobr.github.io/My-IP-Calculator",
    "name": "my-ip-calulator",
    "maintainer": "Bruno Botelho",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "bruno.botelho.br@gmail.com",
    "keywords": "ip,calculator,ipv4,ipv6,net,subnet,cidr,mask,address,convert,validate",
    "author": "Bruno Botelho",
    "author_email": "bruno.botelho.br@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/54/97/fbb40a856813860b2c0627049d80956598d7d38a7fd52cb210be72417cf9/my_ip_calulator-1.0.5.tar.gz",
    "platform": null,
    "description": "# My-IP-Calculator \n\n![Icon](https://brunobotelhobr.github.io/My-IP-Calculator/0.1.0/assets/logo.png)\n\n![GitHub Action CI](https://github.com/brunobotelhobr/My-IP-Calculator/actions/workflows/ci.yml/badge.svg?branch=main)\n![GitHub Action CodeQL](https://github.com/brunobotelhobr/My-IP-Calculator/actions/workflows/codeql.yml/badge.svg?branch=main)\n![GitHub Action Trivy](https://github.com/brunobotelhobr/My-IP-Calculator/actions/workflows/trivy.yml/badge.svg?branch=main)\n[![codecov](https://codecov.io/gh/brunobotelhobr/My-IP-Calculator/branch/main/graph/badge.svg?token=58zkdUzWkh)](https://codecov.io/gh/brunobotelhobr/My-IP-Calculator)\n\n**This an IP address calculator.**\n\nI'm a savy CyberSecurity professional, and the propose of this code is provide and an example and also incentivate my graduation students to develop tools and scripts in python to do defensive or ofensive security tasks.\n\nFeatures:\n\n - Works with IPv6 and IPv4.\n - Convert address to decimal, hexadecimal and bnary form.\n - Valdiate addresses\n - Calculate nets (Broadcast, Network ID and avaliable host address)\n - Calculate Subnets\n\n## Demo\n[![asciicast](https://asciinema.org/a/585954.svg)](https://asciinema.org/a/585954)\n\n## Install\nYou can use this tool in many ways:\n\n### Install from Repository\nWith this command, you PC will download the app from https://pypi.org/project/my-ip-calulator/:\n````\npip install my-ip-calc\n````\n\n[![asciicast](https://asciinema.org/a/585935.svg)](https://asciinema.org/a/585935)\n\n### Run in Container\nWith this commands:\n````\ndocker push brunobotelhobr/my-ip-calulator:latest\ndocker run --rm brunobotelhobr/my-ip-calulator:latest\n````\n\n[![asciicast](https://asciinema.org/a/585942.svg)](https://asciinema.org/a/585942)\n\n### Build from Source Code\nYou mus have python installed.\n\n````\npip install poetry\n\ngit clone https://github.com/brunobotelhobr/My-IP-Calculator.git\ncd My-IP-Calculator\npoetry shell\npoetry install\n\n# Testing\ntask test\n\n# Run\npython src/app/cmd.py\n````\n\n[![asciicast](https://asciinema.org/a/585958.svg)](https://asciinema.org/a/585958)\n\n## How to use\nGeneral:\n\nUsage: `my-ip-calculator [OPTIONS] COMMAND [ARGS]...`\n\nOptions:\n\n    --install-completion          Install completion for the current shell.\n    --show-completion             Show completion for the current shell, to copy it or customize the installation.\n    --help                        Show this message and exit.\n\nCommands:\n\n    net        Calculate the network address from an IP address and a subnet mask, output the address in the desired format.\n    subnet     Split an IP address into network and host parts, output the address in the desired format.\n    val        Validate an IPv4 ou IPv6 address, output the address in the desired format.\n    version    Show version.\n\n### Version\nShow the software version:\n`````\nmy-ip-calculator version\n0.0.2\n`````\n\n### Validate (Val)\nUsage: `my-ip-calculator [OPTIONS] ADDRESS`\n\nValidate an IPv4 ou IPv6 address, output the address in the desired format.    \n\nArguments\n\n    *    address      TEXT  IP address, it supports IPv4 and IPv6 [default: None] [required]\n\nOptions\n\n    --output  -o      [bin|hex|dec]  Output format for the network address details of an IP address, it supports bin, hex, dec. [default: None]\n    --help                           Show this message and exit.\n\nExamples\n\n`````\nmy-ip-calculator val 10.10.10.10\n               Address                \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item    \u2503 Value           \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Version \u2502 4               \u2502 \u2705 OK  \u2502\n\u2502 Address \u2502 010.010.010.010 \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator val 10.10.10.10 -o bin\n                         Address                          \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item    \u2503 Value                               \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Version \u2502 4                                   \u2502 \u2705 OK  \u2502\n\u2502 Address \u2502 00001010.00001010.00001010.00001010 \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator val 10.10.10.10 -o hex\n             Address              \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item    \u2503 Value       \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Version \u2502 4           \u2502 \u2705 OK  \u2502\n\u2502 Address \u2502 0A.0A.0A.0A \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator val 1:2:3:4:5:6:7:8\n                           Address                            \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item    \u2503 Value                                   \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Version \u2502 6                                       \u2502 \u2705 OK  \u2502\n\u2502 Address \u2502 0001:0002:0003:0004:0005:0006:0007:0008 \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\nmy-ip-calculator  val 1:2:3::\n                           Address                            \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item    \u2503 Value                                   \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Version \u2502 6                                       \u2502 \u2705 OK  \u2502\n\u2502 Address \u2502 0001:0002:0003:0000:0000:0000:0000:0000 \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator val A -o hex\n                      Errors                      \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item    \u2503 Value \u2503 Message         \u2503 Status     \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 address \u2502 A     \u2502 Invalid address \u2502 \u26d4 Invalid \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n`````\n\n### Network (Net)\nUsage: `my-ip-calculator net [OPTIONS] ADDRESS [MASK]`\nCalculate the network address from an IP address and a subnet mask, output the address in the desired format.\nif a mask isn't provided:\n\n- For IPv4 it will provide a mask based on the adress class: A, B,C,D and E\n- For IPv6 a standart /64 will be provided.\n\nArguments\n\n    *   address      TEXT    IP address, it supports IPv4 and IPv6. [default: None] [required]\n        mask         [MASK]  IP address mask, if not provided an auto generated one will be assigned. [default:None]\n\nOptions\n\n    --output  -o      [bin|hex|dec]  Output format for the network address details of an IP address, it supports bin, hex, dec. [default:None]\n    --help                           Show this message and exit.\n\nExamples\n````\nmy-ip-calculator net 192.168.0.1\n                 Network                  \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item        \u2503 Value           \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Version     \u2502 4               \u2502 \u2705 OK  \u2502\n\u2502 Address     \u2502 192.168.000.001 \u2502 \u2705 OK  \u2502\n\u2502 Mask        \u2502 255.255.255.000 \u2502 \u2705 OK  \u2502\n\u2502 Network     \u2502 192.168.000.000 \u2502 \u2705 OK  \u2502\n\u2502 Broadcast   \u2502 192.168.000.255 \u2502 \u2705 OK  \u2502\n\u2502 Hosts (dec) \u2502 254             \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator net 192.168.0.1 16\n                 Network                  \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item        \u2503 Value           \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Version     \u2502 4               \u2502 \u2705 OK  \u2502\n\u2502 Address     \u2502 192.168.000.001 \u2502 \u2705 OK  \u2502\n\u2502 Mask        \u2502 255.255.000.000 \u2502 \u2705 OK  \u2502\n\u2502 Network     \u2502 192.168.000.000 \u2502 \u2705 OK  \u2502\n\u2502 Broadcast   \u2502 192.168.255.255 \u2502 \u2705 OK  \u2502\n\u2502 Hosts (dec) \u2502 65534           \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator net 192.168.0.1 16 -o hex\n               Network                \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item        \u2503 Value       \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Version     \u2502 4           \u2502 \u2705 OK  \u2502\n\u2502 Address     \u2502 C0.A8.00.01 \u2502 \u2705 OK  \u2502\n\u2502 Mask        \u2502 FF.FF.00.00 \u2502 \u2705 OK  \u2502\n\u2502 Network     \u2502 C0.A8.00.00 \u2502 \u2705 OK  \u2502\n\u2502 Broadcast   \u2502 C0.A8.FF.FF \u2502 \u2705 OK  \u2502\n\u2502 Hosts (dec) \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator net 192.168.0.1 16 -o bin\n                           Network                            \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item        \u2503 Value                               \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Version     \u2502 4                                   \u2502 \u2705 OK  \u2502\n\u2502 Address     \u2502 11000000.10101000.00000000.00000001 \u2502 \u2705 OK  \u2502\n\u2502 Mask        \u2502 11111111.11111111.00000000.00000000 \u2502 \u2705 OK  \u2502\n\u2502 Network     \u2502 11000000.10101000.00000000.00000000 \u2502 \u2705 OK  \u2502\n\u2502 Broadcast   \u2502 11000000.10101000.11111111.11111111 \u2502 \u2705 OK  \u2502\n\u2502 Hosts (dec) \u2502 65534                               \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator  net 1:2:3:4:5:6:A:B -o hex\n                             Network                              \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item        \u2503 Value                                   \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Version     \u2502 6                                       \u2502 \u2705 OK  \u2502\n\u2502 Address     \u2502 0001:0002:0003:0004:0005:0006:000A:000B \u2502 \u2705 OK  \u2502\n\u2502 Mask        \u2502 FFFF:FFFF:FFFF:FFFF:0000:0000:0000:0000 \u2502 \u2705 OK  \u2502\n\u2502 Network     \u2502 0001:0002:0003:0004:0000:0000:0000:0000 \u2502 \u2705 OK  \u2502\n\u2502 Broadcast   \u2502 0001:0002:0003:0004:FFFF:FFFF:FFFF:FFFF \u2502 \u2705 OK  \u2502\n\u2502 Hosts (dec) \u2502 18446744073709551614                    \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator net 1:2:3:4:5:6:A:B 96 -o hex\n                             Network                              \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item        \u2503 Value                                   \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Version     \u2502 6                                       \u2502 \u2705 OK  \u2502\n\u2502 Address     \u2502 0001:0002:0003:0004:0005:0006:000A:000B \u2502 \u2705 OK  \u2502\n\u2502 Mask        \u2502 FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:0000:0000 \u2502 \u2705 OK  \u2502\n\u2502 Network     \u2502 0001:0002:0003:0004:0005:0006:0000:0000 \u2502 \u2705 OK  \u2502\n\u2502 Broadcast   \u2502 0001:0002:0003:0004:0005:0006:FFFF:FFFF \u2502 \u2705 OK  \u2502\n\u2502 Hosts (dec) \u2502 4294967294                              \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator net 12:A:Z:: -o hex  \n                                       Errors                                       \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item    \u2503 Value                                   \u2503 Message         \u2503 Status     \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 address \u2502 0012:000A:000Z:0000:0000:0000:0000:0000 \u2502 Invalid address \u2502 \u26d4 Invalid \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator net Z -o hex  \n                      Errors                      \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Item    \u2503 Value \u2503 Message         \u2503 Status     \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 address \u2502 A     \u2502 Invalid address \u2502 \u26d4 Invalid \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n````\n\n### Subnet\nUsage: `cmd.py subnet [OPTIONS] ADDRESS MASK PARTS`\n\nSplit an IP address into network and host parts, output the address in the desired format.\n\nArguments \n\n    *    address      TEXT     IP address, it supports IPv4 and IPv6. [default: None][required]\n    *    mask         TEXT     IP address mask. [default: None] [required]\u2502\n    *    parts        INTEGER  Split the netork into this parts. [default: None] [required]\u2502\n\nOptions\n\n    --output  -o      TEXT  Output format for the network address details of an IP address, it supports bin, hex, dec. [default: None]\n    --help                  Show this message and\n\nExamples\n````\nmy-ip-calculator  subnet 192.168.0.1 8 8\n                                        Networks\n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Version \u2503 Network         \u2503 Mask            \u2503 Broadcast       \u2503 Hosts (dec) \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 4       \u2502 192.168.000.000 \u2502 255.255.000.000 \u2502 192.168.255.255 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 192.169.000.000 \u2502 255.255.000.000 \u2502 192.169.255.255 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 192.170.000.000 \u2502 255.255.000.000 \u2502 192.170.255.255 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 192.171.000.000 \u2502 255.255.000.000 \u2502 192.171.255.255 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 192.172.000.000 \u2502 255.255.000.000 \u2502 192.172.255.255 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 192.173.000.000 \u2502 255.255.000.000 \u2502 192.173.255.255 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 192.174.000.000 \u2502 255.255.000.000 \u2502 192.174.255.255 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 192.175.000.000 \u2502 255.255.000.000 \u2502 192.175.255.255 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator subnet 192.168.0.1 8 8 -o hex\n                                  Networks\n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Version \u2503 Network     \u2503 Mask        \u2503 Broadcast   \u2503 Hosts (dec) \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 4       \u2502 C0.A8.00.00 \u2502 FF.FF.00.00 \u2502 C0.A8.FF.FF \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 C0.A9.00.00 \u2502 FF.FF.00.00 \u2502 C0.A9.FF.FF \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 C0.AA.00.00 \u2502 FF.FF.00.00 \u2502 C0.AA.FF.FF \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 C0.AB.00.00 \u2502 FF.FF.00.00 \u2502 C0.AB.FF.FF \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 C0.AC.00.00 \u2502 FF.FF.00.00 \u2502 C0.AC.FF.FF \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 C0.AD.00.00 \u2502 FF.FF.00.00 \u2502 C0.AD.FF.FF \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 C0.AE.00.00 \u2502 FF.FF.00.00 \u2502 C0.AE.FF.FF \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 4       \u2502 C0.AF.00.00 \u2502 FF.FF.00.00 \u2502 C0.AF.FF.FF \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nmy-ip-calculator subnet A:B:C:D:E:: 96 16 -o dec\n                                                                                        Networks                                                                                        \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Version \u2503 Network                                         \u2503 Mask                                            \u2503 Broadcast                                       \u2503 Hosts (dec) \u2503 Status \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00000:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00000:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00001:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00001:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00002:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00002:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00003:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00003:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00004:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00004:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00005:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00005:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00006:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00006:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00007:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00007:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00008:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00008:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00009:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00009:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00010:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00010:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00011:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00011:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00012:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00012:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00013:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00013:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00014:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00014:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2502 6       \u2502 00010:00011:00012:00013:00014:00000:00015:00000 \u2502 65535:65535:65535:65535:65535:65535:65535:00000 \u2502 00010:00011:00012:00013:00014:00000:00015:65535 \u2502 65534       \u2502 \u2705 OK  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n````\n\n## About this code\nIt uses Poetry for dependency management and includes pre-configured tools such as black, flake8, mypy, pylint, pytest, and others, for formatting, linting, testing, and documentation management. \nThe project also includes security tools like trivy and bandit. \n\nThe pyproject.toml file contains various configurations like project metadata, dependencies, build system, and commands for release and documentation management.\n\nTo have more details, check the [Documentation](https://brunobotelhobr.github.io/My-IP-Calculator/)\n\n## Features\n- Project Management\n    - \u2705 [Poetry](https://python-poetry.org/docs/)\n    - \u2705 Script to manage project metadata (Name, Version, Description, etc)\n    - \u2705 Script to Upgrade all dependencies\n    - \u2705 Script to clean all temporary files\n- Code Formatting\n    - \u2705 [Black](https://github.com/psf/black)\n    - \u2705 [isort](https://pycqa.github.io/isort/)\n    - \u2705 [autoflake](https://github.com/myint/autoflake)  \n- Code Linting\n    - \u2705 [Pylint](https://www.pylint.org/)\n    - \u2705 [Flake8](https://flake8.pycqa.org/en/latest/)\n    - \u2705 [Mypy](https://mypy.readthedocs.io/en/stable/)\n- Testing\n    - \u2705 [Pytest](https://docs.pytest.org/en/stable/)\n    - \u2705 [Coverage](https://coverage.readthedocs.io/en/coverage-5.5/)\n    - \u2705 Default tests structure folder for unit and functional tests\n- Security\n    - \u2705 [Trivy](https://aquasecurity.github.io/trivy/v0.40/getting-started/installation/)\n    - \u2705 [Bandit](https://pypi.org/project/bandit/)\n    - \u2705 [Horusec](https://horusec.io/docs/quick-start/installation/)\n- Autoamtion commands\n    - \u2705 [Taskipy](https://github.com/taskipy/taskipy)\n- PyPI\n    - \u2705 Scripts to build and publish to PyPI\n- Docker\n    - \u2705 Scripts to build and publish to Docker Hub\n- Documentation\n    - \u2705 [MkDocs](https://www.mkdocs.org/)\n    - \u2705 [MkDocs Material Theme](https://squidfunk.github.io/mkdocs-material/)\n    - \u2705 [MkDocs Versioning with mike](https://github.com/jimporter/mike)\n    - \u2705 Scripts to generate SBOM (Software Bill of Materials)\n    - \u2705 Scripts to generate requirements.txt\n- CI/CD\n    - \u2705 GitHub Actions to do CI/CD\n\n\n## Tasks\nThis project uses [Taskipy](https://github.com/taskipy/taskipy) to automate common development tasks.\n\nAll tasks are defined in the `pypoject.toml` file.\n\nAlmost all tools used in this project uses `pyproject.toml` to store their configurations.\n\nList of preset tasks:\n````\npre-commit      Run all pre-commit tasks\npre-release     Run all pre-release tasks\n-----------     ----------------------------------------\ninfo            Show project info\nmeta            Update project properties\nupgrade         Upgrade all dependencies\nsec             Run all security checks\nformat          Run all formaters\nlint            Run all linters\nbom             Generate BOM\nreq             Generate requirements.txt\ntest            Run all tests\npypi-build      Build package for PyPI\npypi-auth       Authenticate to PyPI\npypi-pub        Publish package to PyPI\ndocker-list     List docker images\ndocker-build    Build docker image\ndocker-sec-scan Scan a docker image looking for vulenrabilities\ndocker-auth     Authenticate to Docker Hub\ndocker-latest   Tag a docker image as latest\ndocker-pub      Publish docker image to Docker Hub\ndocs            Run docs server\ndocs-list       List docs versions\ndocs-build      Add a new version to docs\ndocs-delete     Delete a version of the docs\ndocs-latest     Set the latest Version.\ndocs-purge      Purge all versions of the docs.\ndocs-pub        Publish documentation to the doc branch on GitHub.\nclean           Clean all generated files\n````\n\n## Requirements\nYou must install manually the following tools:\n\n- Install [Python](https://www.python.org/downloads/)\n- Install [Poetry](https://python-poetry.org/docs/#installation)\n- Install [Trivy](https://aquasecurity.github.io/trivy/v0.40/getting-started/installation/)\n- Install [Horusec](https://horusec.io/docs/quick-start/installation/)\n- Install [Docker](https://docs.docker.com/get-docker/)\n\nBe sure you have installed all the requirements and that you on the desired python Version, you can check it with: \n    `python --version`\n\n## Setup\n```shell\n# Clone the repository\ngit clone https://github.com/brunobotelhobr/My-IP-Calculator.git\n\n# Check the python version, you must use the version that the project will use.\npython -V\n\n# Install the dependencies\npip install poetry\npoetry shell\npoetry install\n\n# Check the taskipi commands:\ntask --list\n\n# Update projetct metadata\ntask meta\n```\n\n## How Start?\n\n### 1. Fork the project\n```shell\n# Clone the repository\ngit clone\n\n# Check the python version, you must use the version that the project will use.\npython -V\n\n# Install the dependencies\npip install poetry\npoetry shell\npoetry install\n\n# Check the taskipi commands:\ntask --list\n```\n\n### 2. Create a new branch with your changes\n```shell\n# Create a new branch\ngit checkout -b <branch-name>\n```\n\n### 3. Make the changes and commit\n```shell\n# Check for lint errors\ntask format\ntask lint\n\n# Check for security errors\ntask sec\n\n# Update the meta\ntask meta\ntask bom\ntask req\n\n# Add the changes\ngit add .\n```\n\n### 4. Open a Pull Request\n```shell\ngit commit -m \"feat: add a new feature\"\ngit push origin <branch-name>\n```\n\n## Hints\n- How add a Dev Package\n   -  `poetry add --dev <package-name>`\n- How add a Prod Package\n    - `poetry add <package-name>`\n- How add a Package with extras\n    - `poetry add <package-name> -E <extras>`\n- How remove a Package\n    - `poetry remove <package-name>`\n\n## Call for Contributors\nWe invite you to contribute to this repository and help us make it even better. \nWhether it's bug fixes, new features, or documentation improvements, we welcome all contributions. \nPlease read our documentation for guidelines on how to contribute. \nHappy coding!\n\ncheck the [Documentation](https://brunobotelhobr.github.io/My-IP-Calculator/) for more details.\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/brunobotelhobr)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This is an IPv4 and IPv6 calculator. It can validate IP address, convert then and also do net and subnet calculations.",
    "version": "1.0.5",
    "project_urls": {
        "Homepage": "https://brunobotelhobr.github.io/My-IP-Calculator",
        "Repository": "https://github.com/brunobotelhobr/My-IP-Calculator"
    },
    "split_keywords": [
        "ip",
        "calculator",
        "ipv4",
        "ipv6",
        "net",
        "subnet",
        "cidr",
        "mask",
        "address",
        "convert",
        "validate"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "001e14d061148b7a3e578429da1b2f083bb8cb843b8ed6fa468b1360de61d6f7",
                "md5": "006636019506fa17fda269cd6df6b10e",
                "sha256": "29cae311343366aa8774e2e780b230d9a7fbd49777ac2b528e624d91977107b3"
            },
            "downloads": -1,
            "filename": "my_ip_calulator-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "006636019506fa17fda269cd6df6b10e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 12575,
            "upload_time": "2023-10-03T20:49:30",
            "upload_time_iso_8601": "2023-10-03T20:49:30.512655Z",
            "url": "https://files.pythonhosted.org/packages/00/1e/14d061148b7a3e578429da1b2f083bb8cb843b8ed6fa468b1360de61d6f7/my_ip_calulator-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5497fbb40a856813860b2c0627049d80956598d7d38a7fd52cb210be72417cf9",
                "md5": "09404136baf8a1924dca7af616880619",
                "sha256": "256e7f7cdfe75b98fb6f1c96a93c1a8e95740fb49ab20d328199d6c93409e1ae"
            },
            "downloads": -1,
            "filename": "my_ip_calulator-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "09404136baf8a1924dca7af616880619",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 17937,
            "upload_time": "2023-10-03T20:49:32",
            "upload_time_iso_8601": "2023-10-03T20:49:32.118093Z",
            "url": "https://files.pythonhosted.org/packages/54/97/fbb40a856813860b2c0627049d80956598d7d38a7fd52cb210be72417cf9/my_ip_calulator-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-03 20:49:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "brunobotelhobr",
    "github_project": "My-IP-Calculator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "my-ip-calulator"
}
        
Elapsed time: 0.12148s