Iprange
IPv4 address parser for the nmap format
Install / Use
/learn @malfunkt/IprangeREADME
iprange
iprange is a library you can use to parse IPv4 addresses from a string in the nmap format.
It takes a string, and returns a list of Min-Max pairs, which can then be expanded and normalized automatically by the package.
Supported Formats
iprange supports the following formats:
10.0.0.110.0.0.0/2410.0.0.*10.0.0.1-1010.0.0.1, 10.0.0.5-10, 192.168.1.*, 192.168.10.0/24
Usage
package main
import (
"log"
"github.com/malfunkt/iprange"
)
func main() {
list, err := iprange.ParseList("10.0.0.1, 10.0.0.5-10, 192.168.1.*, 192.168.10.0/24")
if err != nil {
log.Printf("error: %s", err)
}
log.Printf("%+v", list)
rng := list.Expand()
log.Printf("%s", rng)
}
Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.2kCommit, push, and open a PR
