Network
Batch-expand a file of CIDR ranges into hosts
Expand many CIDR ranges from one file.
overview
What decant-file does
When recon leaves a file of network blocks, decant-file is the managed Network node that reads cidr-addresses and writes one flat host list as FILE and FOLDER.
Cloud-range exports, ASN prefix dumps, or inventory CIDRs that must become concrete IPs before a scanner. No CLI flags; the file is the whole interface.
Use the single-address Decant variant for one range. For aggregation, slicing, or host counting instead of full expansion, mapcidr.
source github.com/Cgboal/Decant
use cases
Where decant-file fits
Expand many ranges at once
Read a file of CIDR blocks and emit every IP across all of them as one flat list, ready for a scanner or prober.
Normalize cloud and ASN ranges
Convert provider CIDR exports or ASN-derived prefixes into concrete addresses so downstream nodes enumerate the hosts inside them.
Feed a port scanner at scale
Hand the expanded addresses to naabu, rustscan, or masscan, which want a flat host list rather than network notation.
Standardize recon inputs
Turn a mixed set of network blocks into a uniform IP list early so every later stage reads the same format.
reference
decant-file inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| cidr-addresses | FILE | · | File of CIDR ranges to expand into a flat list of IP addresses. |
Showing key inputs. decant-file exposes 1 inputs in total.
example
Run decant-file
# expand a file of CIDR ranges into a flat IP listcat cidr-ranges.txt | decant > ips.txt198.51.100.0198.51.100.1198.51.100.2198.51.100.3198.51.100.4198.51.100.5198.51.100.6198.51.100.7… (512 IPs expanded from 198.51.100.0/24 and 203.0.113.0/24)guidance
Choosing decant-file
Use decant-file when a file of CIDR ranges must become a flat IP list. For a single range, Decant is simpler. For CIDR aggregation and slicing rather than full expansion, mapcidr.
decant
Same expansion for one CIDR address instead of a file.
mapcidr
Aggregation, slicing, and expansion when a flat list is not enough.
prips
Prints each IP in a range. Comparable range-to-host primitive.
faq
decant-file questions
related
More Network tools
asnmap
Map an organization's network ranges from ASN data.
dnsvalidator
Validate public DNS resolvers against trusted baselines.
fping
Parallel ICMP echo sweeps for CIDR ranges and host files.
httprobe
Probe a domain list for working HTTP and HTTPS servers.
httpx
A fast and multi-purpose HTTP toolkit that runs multiple probers with reliable, high-throughput results.
mapcidr
Expand, aggregate, and slice CIDR ranges into host lists.
Run decant-file yourself
A file of CIDR ranges feeds Decant file, which expands them all into individual IPs and passes them to naabu so the open ports land as output.
Facts on this page come from the live Trickest tool library.