loading
loading
Network
Expand, aggregate, and slice CIDR ranges into host lists.
overview
mapcidr sits between discovered network ranges and host-level scanners. Feed a CIDR or a file of CIDRs; expand to every IP, or collapse scattered IPs with -aggregate into a minimal subnet set.
Use it when asnmap (or another range source) produced address space and the next node needs individual hosts, parallel chunks via -sbc/-sbh, or a cleaned list after -match-ip / -filter-ip.
It rewrites address lists only; it does not probe ports. Pass FILE and FOLDER output to naabu or a similar scanner for the next discovery stage.
use cases
Turn a file of subnets from asnmap into every individual IP so a port scanner like naabu can probe each host directly instead of a range.
Collapse a long list of single IPs and overlapping ranges into the smallest set of CIDRs that covers them, shrinking the scope you hand downstream.
Split a wide CIDR into a fixed number of chunks or by host count, then fan the slices out across parallel scanner nodes to cover the space faster.
Keep only IPv4 or IPv6, drop base and broadcast addresses, and match or exclude against a file so the scan runs only on the IPs that matter.
reference
| Name | Type | Flag | Description |
|---|---|---|---|
| target | STRING | -cidr | A single CIDR or IP to process, example: 173.0.84.0/24. |
| cidr | FILE | -cidr | File containing a list of CIDRs or IPs to process in bulk. |
| aggregate | BOOLEAN | -aggregate | Aggregate the input IPs and CIDRs into the minimum subnet set. |
| slice-by-host-count | STRING | -sbh | Slice the input CIDRs by a given host count per slice. |
| slice-by-count | STRING | -sbc | Slice the input CIDRs into a given number of CIDR chunks. |
| count | BOOLEAN | -count | Count the number of IPs in the given CIDR. |
| match-ip | FILE | -match-ip | File of IPs or CIDRs to keep, dropping everything else. |
| filter-ip | FILE | -filter-ip | File of IPs or CIDRs to exclude from the output. |
Showing key inputs. mapcidr exposes 24 inputs in total.
| Name | Type | Flag | Description |
|---|---|---|---|
| cidr | FILE | -cidr | File containing a list of CIDRs or IPs to process. |
| sort | BOOLEAN | -sort | Sort input IPs and CIDRs in ascending order. |
| count | BOOLEAN | -count | Count the number of IPs in a given CIDR. |
| silent | BOOLEAN | -silent | Silent mode; print only results. |
| target | STRING | -cidr | A single CIDR or IP to process. |
| to-ipv4 | BOOLEAN | -to-ipv4 | Convert IPs to IPv4 format. |
| to-ipv6 | BOOLEAN | -to-ipv6 | Convert IPs to IPv6 format. |
| verbose | BOOLEAN | -verbose | Verbose mode. |
| match-ip | FILE | -match-ip | File of IPs or CIDRs to match, keeping only those. |
| aggregate | BOOLEAN | -aggregate | Aggregate input IPs and CIDRs into the minimum subnet set. |
| filter-ip | FILE | -filter-ip | File of IPs or CIDRs to filter out of the output. |
| ip-format | STRING | -ip-format | IP output formats (0,1,2,3,4,5,6,7,8,9,10,11). |
| skip-base | BOOLEAN | -skip-base | Skip base IPs (ending in .0) in the output. |
| shuffle-ip | BOOLEAN | -shuffle-ip | Shuffle input IPs into random order. |
| filter-ipv4 | BOOLEAN | -filter-ipv4 | Filter IPv4 addresses from the input. |
| filter-ipv6 | BOOLEAN | -filter-ipv6 | Filter IPv6 addresses from the input. |
| shuffle-port | STRING | -shuffle-port | Shuffle input IP:Port pairs into random order. |
| sort-reverse | BOOLEAN | -sort-reverse | Sort input IPs and CIDRs in descending order. |
| skip-broadcast | BOOLEAN | -skip-broadcast | Skip broadcast IPs (ending in .255) in the output. |
| slice-by-count | STRING | -sbc | Slice CIDRs into a given number of CIDR chunks. |
| zero-pad-number | STRING | -zero-pad-n | Number of padded zeros to use (default 3). |
| aggregate-approx | BOOLEAN | -aggregate-approx | Aggregate sparse IPs and CIDRs into a minimum approximated subnet. |
| zero-pad-permute | BOOLEAN | -zero-pad-permute | Enable permutations from 0 to zero-pad-n for each octet. |
| slice-by-host-count | STRING | -sbh | Slice CIDRs by a given host count per slice. |
example
# expand a CIDR into hosts, dropping .0 and .255mapcidr -cidr 198.51.100.0/24 -skip-base -skip-broadcast -o hosts.txt198.51.100.1198.51.100.2198.51.100.3198.51.100.4198.51.100.5198.51.100.6198.51.100.7198.51.100.8… (254 hosts for the /24 after skipping .0 and .255)guidance
Use mapcidr to expand CIDRs into host lists, aggregate scattered IPs, or slice ranges for parallel scans. It manipulates address space only. Feed it from asnmap; pass output to a port scanner such as naabu.
Maps an organization to CIDR ranges. Run before mapcidr to produce the ranges you expand.
Pulls prefixes for an ASN. A focused range source when you already have the AS number.
Prints every IP in a CIDR. Minimal expansion only; mapcidr adds aggregation, slicing, and filtering.
faq
related
Map an organization's network ranges from ASN data.
Validate public DNS resolvers against trusted baselines.
Parallel ICMP echo sweeps for CIDR ranges and host files.
Probe a domain list for working HTTP and HTTPS servers.
A fast and multi-purpose HTTP toolkit that runs multiple probers with reliable, high-throughput results.
Asynchronous SYN port scanner for wide IP ranges; bound runs with --rate and --excludefile.
An organization name feeds asnmap, which maps its CIDR ranges and passes them to mapcidr, expanding them into a host-list output ready for scanning.
Facts on this page come from the live Trickest tool library.