GenIP is a small utility, based on the NMap target specification code, for quickly and easily generating lists of IP addresses.
Version: 1.0GenIP is a small utility, based on the NMap target specification code, for quickly and easily generating lists of IP addresses.
Operating System: Linux
genip [ -h ] [ -i filename ] [ < target-spec > ... ]
genip -r < ipaddress > < ipaddress >
GenIP has two modes of operation that are detailed below:
NMap Mode (Default)
In this mode genip will expand all target specifications listed on the command line. Since genip is essentially just the NMap target parsing code it functions in exactly the same way. Here is what the NMap documentation has to say about target specification:
Everything that isn't an option (or option argument) is treated as a target host specification. The simplest case is listing single hostnames or IP addresses on the command line. If you want to scan a subnet of IP addresses, you can append /mask to the hostname or IP address. mask must be between 0 (scan the whole Internet) and 32 (scan the single host specified). Use /24 to scan a class "C" address and /16 for a class "B". There is also a more powerful notation which lets you specify an IP address using lists/ranges for each element. Thus you can scan the whole class "B" network 192.168.*.* by specifying "192.168.*.*" or "192.168.0-255.0-255" or even "192.168.1-50,51-255.1,2,3,4,5-255". And of course you can use the mask notation: "192.168.0.0/16". These are all equivalent. If you use asterisks ("*"), remember that most shells require you to escape them with back slashes or protect them with quotes.
In this mode two (and only two!) IP addresses must be specified, in dotted quad notation, and the output is all the addresses between the two (inclusive). This mode can be used to cross class boundaries.
In its most basic form genip simply echos the IP addresses listed on the command line:
> genip 10.1.1.1 10.3.4.5
By use one of the many expansion methods detailed above a large number of IP addresses can be generated from simple command line specifications:
> genip 10.1.1.1-3
By selecting range mode (with the use of the -r flag) it is a simple matter to generate address lists that cross class boundaries:
> genip -r 10.1.1.254 10.1.2.2