mapcidr-cidr

Expand, aggregate, slice, and shuffle CIDR ranges and IP lists with mapcidr.

1.7k|238|Updated Dec 7, 2019
One-click install
npx skills add https://github.com/wgpsec/AboutSecurity --skill mapcidr-cidr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mapcidr-cidr
Source: https://github.com/wgpsec/AboutSecurity/tree/main/skills/tool/mapcidr-cidr
Command: npx skills add https://github.com/wgpsec/AboutSecurity --skill mapcidr-cidr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing large CIDR blocks and IP lists during reconnaissance and scanning is error-prone when done manually. This Skill provides the mapcidr command patterns needed to expand CIDRs into IP lists, aggregate IPs back into CIDRs, slice networks into smaller chunks, and shuffle scan order.

Core Features & Use Cases

  • CIDR Expansion and Counting: Expand a CIDR like 192.168.1.0/24 into individual IPs or count total addresses, with options to skip base and broadcast addresses.
  • Aggregation and Slicing: Aggregate IP lists into minimal CIDRs, or slice large networks by host count (-sbh) or target prefix size (-sbc) for distributed scanning.
  • Pipeline Integration: Shuffle IP order with -si to avoid sequential-scan detection, and pipe results directly into tools like naabu for port scanning.
  • Use Case: Given a 10.0.0.0/16 target scope, slice it into /24 blocks and feed each block to naabu for parallel port scanning across 80 and 443.

Quick Start

Ask the AI to expand the CIDR 10.0.0.0/24 into a shuffled IP list using mapcidr and pipe it into a port scan.

Frequently Asked Questions about mapcidr-cidr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expand a CIDR range into a list of IP addresses?

Pipe the CIDR into mapcidr, for example: echo 192.168.1.0/24 | mapcidr. It outputs one IP per line, and you can add -skip-base and -skip-broadcast to exclude network and broadcast addresses.

How to split a large CIDR block into smaller subnets for scanning?

Use mapcidr slicing flags: -sbh slices by host count (e.g., -sbh 256) and -sbc slices by prefix size (e.g., -sbc 24 for /24 blocks). Each resulting subnet can be piped to a scanner like naabu.

Does mapcidr support IPv6 addresses?

Yes, mapcidr supports both IPv4 and IPv6 CIDR processing. The same expand, aggregate, count, and slice operations work on IPv6 ranges.

How do I avoid detection when scanning IPs in sequential order?

Use the -si flag to shuffle IP order before scanning, for example: echo 192.168.1.0/24 | mapcidr -si | naabu -p 80,443. Randomized order reduces the chance of triggering sequential-scan alerts.

Can mapcidr aggregate a list of IPs back into CIDR blocks?

Yes, pipe an IP list into mapcidr with the -aggregate flag, such as cat ips.txt | mapcidr -aggregate. It deduplicates and compresses the addresses into minimal CIDR notation.