Skip to content

A lightweight CLI tool that transforms CIDR notations into a list of IP addresses.

License

Notifications You must be signed in to change notification settings

rcmelendez/cidr2ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cidr2ip

cidr2ip is a lightweight CLI tool that transforms CIDR notations into a list of IP addresses. The generated list is saved to a CSV file, making it convenient for creating lookup tables for Devo.

Benefits

  • Incredibly easy to use.
  • Generate a list of IP addresses from multiple CIDR notations.
  • Support for both command-line arguments and input from a file.
  • Includes all IP addresses (network and broadcast addresses included).

Getting Started

Installation

cidr2ip is available on Linux, macOS, and Windows platforms. The pre-built binaries are available in the Releases page.

Alternatively, you can build it from source by running:

go build .

Usage

For macOS/Linux:

./cidr2ip [-f filename] <CIDR1 CIDR2 ...>

For Windows:

.\cidr2ip.exe [-f filename] <CIDR1 CIDR2 ...>

Pro tip: To avoid using the full path, add the directory containing the cidr2ip binary to the system's PATH environment variable.

Examples

Generate IP list from CIDRs 192.168.1.0/24 and 10.0.0.0/8 as command-line arguments:

cidr2ip 192.168.1.0/24 10.0.0.0/8

Generate IP list from the file cidr_list:

cidr2ip -f cidr_list

Successful Output

Upon successful execution, cidr2ip will display a message indicating the generated CSV filename along with a timestamp. The format is as follows:

IP list saved to cidr2ip_YYYY-MM-DD_HH-MM-SS.csv

License

cidr2ip is licensed under the terms of the MIT License.

Contact

Find me as rcmelendez on LinkedIn, Medium, and GitHub.

About

A lightweight CLI tool that transforms CIDR notations into a list of IP addresses.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages