Giter VIP home page Giter VIP logo

ip-calc's Introduction

IP Conversion Tool

IP Calculator for IP RANGE, HEX, BINARY, CIDR

This quick Python script provides a command-line interface for converting IP addresses and ranges between different formats. It supports converting between decimal, hexadecimal, binary, and CIDR notation. The tool also allows for converting CIDR notation to IP ranges and finding the smallest CIDR block that encompasses a given IP range.

Features

  • Convert IP addresses to hexadecimal format.
  • Convert IP addresses to binary format.
  • Convert binary IP addresses back to decimal format.
  • Convert hexadecimal IP addresses back to decimal format.
  • Convert CIDR notation to IP range.
  • Convert an IP range to the smallest possible CIDR block that covers the entire range.

Usage

Run the script in your terminal, and you will be presented with a menu of options:

Menu:

  1. Convert IP to HEX
  2. Convert IP to Binary
  3. Convert Binary to IP
  4. Convert HEX to IP
  5. Convert CIDR to IP Range
  6. Convert IP Range to the smallest CIDR block
  7. Exit

Enter the number corresponding to the action you want to perform and follow the prompts.

Requirements

  • Python 3

Installation

Clone this repository to your local machine:

git clone https://github.com/Dan-Duran/ip-calc.git && cd ip-calc/
python3 ip-calc.py

If you want colored output, install the termcolor library:

License

ip-calc's People

Contributors

dan-duran avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.