Updated Jul 14, 2026

Network

Shell-expand an IP range into a host list

Portable shell expansion of IP ranges into host lists.

Agent

overview

What prips-sh does

Use prips.sh when a scanner needs a flat host list and you want the portable shell form rather than the compiled prips binary.

Feed ip-address-range as a start-end pair or CIDR; thin with -i, format with -f, or cap the first slice with -n before a full /16 expand.

It enumerates hosts only. Compiled prips adds CIDR collapse and exclude lists; mapcidr handles CIDR set ops; naabu or masscan scan the list next.

source github.com/honzahommer/prips.sh

use cases

Where prips-sh fits

Expand a range for scanning

Convert a start-and-end pair or a CIDR into every address inside so a port scanner receives a flat host list it can read.

Sample a large block

Use -n to print only the first N addresses, or -i to keep every Nth, and probe a representative slice before committing to a full sweep.

Emit numeric addresses for other tools

Set -f to dec or hex to write each address as a single integer for scripts or tools that expect a numeric form rather than dotted notation.

Run without a compiled binary

Use the shell form in stripped-down or containerized environments where shipping the compiled prips is inconvenient, keeping the same expansion behavior.

reference

prips-sh inputs and flags

4 inputs
NameTypeFlagDescription
ip-address-rangeSTRING·The range to expand, as a start and end pair (198.51.100.0 198.51.100.255) or a CIDR (198.51.100.0/24).
incrementSTRING-iPrint every Nth address to thin out a dense range.
address-formatSTRING-fFormat addresses as hex, dec, or dot.
number-of-addressesSTRING-nCap the output to a set number of addresses from the start (the end must not be set).

Showing key inputs. prips-sh exposes 4 inputs in total.

example

Run prips-sh

prips-sh · command
# expand a CIDR block into every address, one IP per lineprips.sh 198.51.100.0/24 > hosts.txt
sample output
198.51.100.0198.51.100.1198.51.100.2198.51.100.3198.51.100.4198.51.100.5198.51.100.6198.51.100.7…  (256 addresses for 198.51.100.0/24)

guidance

Choosing prips-sh

Use prips.sh to expand an IP range or CIDR into a host list when you want the shell form. Follow with a port scanner. Prefer compiled prips for CIDR-collapse (-c) or exclude (-l). Prefer mapcidr for CIDR set operations.

prips

Compiled original with the same expansion job, plus CIDR-collapse (-c) and exclude (-l).

mapcidr

Aggregates and manipulates CIDR ranges. Use for set operations, not plain host expansion.

naabu

Scans the expanded host list for open ports. Natural next stage after prips.sh.

faq

prips-sh questions

Same core job: expand a range or CIDR into one address per line. prips.sh is a portable shell rewrite. Compiled prips adds CIDR-collapse and exclude options this shell form does not expose.

Run prips-sh yourself

A CIDR range feeds prips.sh, which expands it into individual addresses for masscan to scan before the open ports land as output.

Facts on this page come from the live Trickest tool library.