MapCIDR
Map CIDR ranges to IP addresses by ProjectDiscovery with expansion and filtering capabilities
Recon & OSINT8 commands
#cidr#network#ip#projectdiscovery#recon
Installation
1Install using Go
2Verify installation
# Using Go
go install github.com/projectdiscovery/mapcidr/cmd/mapcidr@latest
# Verify
mapcidr --versionBasic Usage
Expand CIDR ranges to individual IP addresses with various filtering options
# Expand a single CIDR range
mapcidr -cl 192.168.0.0/24
# Expand multiple CIDRs from file
mapcidr -l cidrs.txt
# Count IPs in a range
mapcidr -cl 10.0.0.0/16 -count
# Filter by octet pattern
mapcidr -cl 192.168.0.0/16 -o 192.168.1
# Output to file
mapcidr -cl 192.168.0.0/24 -o ips.txt
# Aggregate IPs to CIDR notation
mapcidr -aggregate -l ips.txtCommand Reference
8 commands
1CIDR list (comma-separated)
-cl2File containing CIDR ranges
-l3Output file
-o4Count IPs in range
-count5Aggregate IPs to CIDR notation
-aggregate6Filter IPs by pattern
-filter-ip7Silent mode
-silent8Show version
-versionWhen to Use
1
Expanding CIDR ranges for mass scanning2
Counting IPs in subnet ranges3
Generating IP lists from network blocks4
Aggregating scattered IPs back to CIDR notation5
Filtering IPs by specific octet patternsNotes & Tips
1
Part of the ProjectDiscovery ecosystem2
Can handle both IPv4 and IPv6 ranges3
Use -silent for clean output piped to other tools4
Combine with httpx or naabu for service discoveryCommon Errors & Solutions
Invalid CIDR format
Ensure CIDR notation is correct (e.g., 192.168.0.0/24)
No output
Check that the CIDR range is valid and accessible