Skip to content

[Feature] Support for Nmap-style IP Range Syntax #660

@m101

Description

@m101

Is your feature request related to a problem? Please describe.

Please consider adding support for Nmap-style IP range input syntax in mapcidr.

This includes formats like:

  • Dash ranges (e.g., 192.168.1.1-10)
  • Ranges in any octet (e.g., 192.168.0-3.5-10)
  • Comma-separated targets (e.g., 192.168.1.1,192.168.1.5-10)

Describe the solution you'd like

Extend mapcidr to accept and expand the following syntaxes:

  • Dash-based ranges:
echo "192.168.1.1-5" |  mapcidr
  # → 192.168.1.1, 192.168.1.2, ..., 192.168.1.5
  • Multi-octet ranges:
echo "192.168.0-1.1-2" | mapcidr
# → 192.168.0.1, 192.168.0.2, 192.168.1.1, 192.168.1.2
  • Comma-separated values:
mapcidr -range "10.0.0.1,10.0.0.5-7,10.0.1.0/30"
# → 10.0.0.1, 10.0.0.5, 10.0.0.6, 10.0.0.5, 10.0.1.0, 10.0.1.1, 10.0.1.2, 10.0.1.3

This would mirror Nmap’s flexible input parsing while keeping the output behavior of mapcidr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EnhancementMost issues will probably ask for additions or changes.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions