Xip is a command line tool designed to extract IP addresses and address ranges from text files. This can be very useful for all manner of network related operations including analyzing log files and extracting IP addresses from emails.

The program will identify IP addresses on their own (e.g., IP address ranges separated with a dash character (e.g. or and CIDR format ranges (e.g. The output is de-duped and sorted with addresses consolidated into ranges by default.

How to use it

Operation of the program is quite straightforward and the syntax is shown below. This syntax will be shown when you simply type Xip or Xip -?. Explanations of the various options are shown here.

  • Shows the program syntax
  • Do not treat IP addresses like as CIDR format. In this example the program would only identify the address
  • Outputs the results as a list of individual IP addresses rather than consolidating IP ranges.
  • Outputs all IP addresses/ranges on 1 line, separated by commas. The default behavior is to output each IP or range on a separate line.
  • Tells the program to not merge adjoining IP address ranges when outputting the results. e.g. if the input consisted of the IP addresses,,, the output would be, instead of the normalized
  • Sends the output to the given file, overwriting any existing contents.
  • Sends the output to the given file, appending to any existing contents.
  • Do not treat IP addresses like as an IP range. In this example the program would only identify the two IP addresses and

The processing of CIDR format addresses is interpreted by taking the number of network bits (the number after the '/' character) and creating a range starting from the IP part of the address (the number before the '/' character) and ending at the maximum IP address defined by the network bitmask. For example, the CIDR range format would result in an output IP address range of

Command line syntax

Xip 1.00 - Robin Keir - 2005 - http://keir.net

Xip [-?cilmoOrv] [...]

-? - Shows this help text
-c - Don't parse CIDR ranges
-i - Output as individual IPs instead of ranges
-l - Output everything on one line
-m - Don't merge adjoining ranges
-o - Output file (overwrite)
-O - Output file (append)
-r - Don't parse ranges
-v - Verbose mode

Any number of filenames can be specified and wildcards can be used to specify multiple files. Input can be directed from stdin or from a pipe
with the usual '<' and '|' syntax.


Xip -vi log.txt -o ips.txt
Xip -l *.log | myportscanner.exe
echo | Xip -i

Version 1.00
  • Initial release