mailing list archives
Re: Ncat proposal: new environment variables
From: Jacek Wielemborek <wielemborekj1 () gmail com>
Date: Sat, 20 Jul 2013 02:19:03 +0200
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
* 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,
* NCAT_SSL - set to "1" if we're using SSL. Not set otherwise.
In addition to the code (which works under Windows as well) and its
tests and documentation, I also added some examples. This includes a
p0fme.py script, which tells the connecting user everything it could
gather on her, using TCP fingerprinting (requires an external tool -
p0f, see: http://lcamtuf.coredump.cx/p0f3/ ). There's also a simple
shell script demonstrating logging and a Lua "whatismyip" script.
Feel free to pull the nmap-exp/d33tah/ncat-env-conninfo branch, try it
out and - if you have some time - read the diff (against r31368).
Feedback is more than welcome! :)
I'm also really interested about the Ncat tricks you invented that
make use of these variables.
Sent through the dev mailing list
Archived at http://seclists.org/nmap-dev/