Skip to content

Tes3awy/HEX-to-IP-Conversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python 3.7+ Code Size Code style: black Imports: isort Pre-Commit License

Convert IPv4 Address to Hexadecimal Address and vice versa

This application is useful for Cisco Wireless and Collaboration teams where Hexadecimal Addresses are preferably to be used in DHCP pools option commands.

DHCP Pools Example

configure terminal
!
ip dhcp pool APs
   network 60.0.0.0 255.255.255.0
   default-router 60.0.0.1
   option 43 hex f104.0a0a.0a0f
exit
!
ip dhcp pool Voice
   network 192.168.1.0 255.255.255.0
   default-router 192.168.1.1
   option 150 hex c0a8.0101
   lease 86400
exit
!
end

Table of Contents

  1. Getting Started
  2. Installation on Windows
  3. Installation on macOs and Linux
  4. Usage

Getting Started

Directory Structure

│   main.py  # Main application
│   conversion.py  # conversion class
│   README.md
│   requirements.txt
│   .pre-commit-config.yaml
│   .gitignore
│   LICENSE
└───

Installation on Windows

path\to\folder> git clone https://github.com/Tes3awy/HEX-to-IP-Conversion.git
path\to\folder> cd HEX-to-IP-Conversion
path\to\folder> py -m venv .venv
path\to\folder> .venv\Scripts\Activate.ps1
path\to\folder> py -m pip install --upgrade pip setuptools
path\to\folder> py -m pip install -r requirements.txt

Installation on macOS and Linux

$ git clone https://github.com/Tes3awy/HEX-to-IP-Conversion.git
$ cd HEX-to-IP-Conversion
$ python3 -m venv .venv
$ source .venv/bin/activate
$ python3 -m pip install --upgrade pip setuptools
$ python3 -m pip install -r requirements.txt --upgrade

Usage

(.venv)$ python -m main

[1] IPv4 to Hex
[2] Hex to IPv4

Enter 1 or 2 [Default 1]: