port_hack is a quick utility to remap ports which a program binds to.

Run `make' to build a small library which will intercept the bind() call.
This will only work if the target program is not statically linked.

You can use it like this:

% env LD_PRELOAD=/path/to/port_hack.so PORT_HACK_VERBOSE=1 PORT_HACK=2092-2095:2093,2097:2100 netcat -l -p 2094

This would cause netcat to listen on port 2093 instead of 2094.

As seen in the example above, port range specifications can be in either
<from>:<to> format, to map a single port, or <min>-<max>:<to> format, to
map a range of ports onto a single destination port.

PORT_HACK_VERBOSE, if present in the environment, will cause port_hack to
print messages about what it's doing to stderr.

Copyright infomation for port_hack
----------------------------------
port_hack is distributed under a BSD-style license. The terms and
conditions can be found in the accompanying LICENSE file.
