https://github.com/robert-mcdermott/cidr2ips
CIDR to IP list
https://github.com/robert-mcdermott/cidr2ips
cidr golang network
Last synced: 8 months ago
JSON representation
CIDR to IP list
- Host: GitHub
- URL: https://github.com/robert-mcdermott/cidr2ips
- Owner: robert-mcdermott
- Created: 2018-03-01T03:57:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-13T16:46:27.000Z (over 8 years ago)
- Last Synced: 2025-03-23T16:17:09.480Z (over 1 year ago)
- Topics: cidr, golang, network
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cidr2ips - CIDR to IP list
[](https://goreportcard.com/report/github.com/robert-mcdermott/cidr2ips)
This utility takes a network CIDR range (192.168.0.0/16) and expands it to a list of IP addresses that are printed to standard out, one IP per line. By default the IP addresses are printed sequentially, but if you would like to randomize the output you can use the --randomize flag.
## Usage
```
Usage: ./cidr2ips [--randomize] --cidr
Example: ./cidr2ips --cidr 172.17.24.0/24 --randomize
--cidr string
Required: CIDR block (ex: 192.168.0.0/16) to expand to a list of IP addresses
--help
Print usage information
--randomize
Optional: randomize the order of the IP addresses provided as output
--full
Optional: provide the network and broadcast addresses in the output; by default only usable addresses are included
```
## Example
```
./cidr2ips --cidr 192.168.43.0/28
192.168.43.1
192.168.43.2
192.168.43.3
192.168.43.4
192.168.43.5
192.168.43.6
192.168.43.7
192.168.43.8
192.168.43.9
192.168.43.10
192.168.43.11
192.168.43.12
192.168.43.13
192.168.43.14
```