Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: Ncat proposal: new environment variables
From: David Fifield <david () bamsoftware com>
Date: Tue, 23 Jul 2013 02:30:27 -0700

On Sat, Jul 20, 2013 at 02:19:03AM +0200, Jacek Wielemborek wrote:
I had a meeting with David this Tuesday and was assigned to implement
the proposal from my previous post, without ncatin/ncatout FD numbers
yet (I will probably be adding them next week). So, here's a list of
environment variables that I introduced to the
--exec/--sh-exec/--lua-exec child processes (along with a quote from
the docs written by me):

 * NCAT_REMOTE_ADDR - the remote address - in connect mode, it's the
one we're connecting to, in listen mode - it's the one that connected
to us,
 * NCAT_REMOTE_PORT - the remote port number, where "remote" means the
same as above,
 * NCAT_LOCAL_ADDR - our local address used for
establishing/receiving the connection,
 * NCAT_LOCAL_PORT - our local port number,
 * NCAT_PROTO - the protocol name - TCP, UDP or SCTP,

For some background on these choices for variable names, we took some
guidance from existing inetd programs
and ucspi-tcp (http://cr.yp.to/ucspi-tcp/environment.html).

These programs set variable names like these:

We chose to use different variable names. The main reason for this is
that we wanted the names to remain the same no matter the protocol being
used--so you can use the same script without having to change

David Fifield
Sent through the dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]