Nmap Development mailing list archives

Re: ncat: Listen Plus Exec Equals Keep-Open


From: David Millis <tvtronix () yahoo com>
Date: Tue, 6 Apr 2010 22:40:06 -0700 (PDT)

Okay, I can see your point. Changing the behavior is easy technically:
just change netrun to netexec in ncat_listen.c. It's would break
backwards compatibility with option syntax, though.

We had a similar situation with normal listen mode. The -k option was
added fairly recently. Before that, the default was to keep listening
always.

http://seclists.org/nmap-dev/2009/q2/620

Does anyone have thoughts on making a one-connection mode the default
for --exec, and using -k --exec for the current inetd-like behavior?

I'm all for it of course. But then that's how I interpreted ncat already worked from the help. :)

Thanks for the 5.3b1 release which fixed the other problems I had. Now I can at least pass unidirectional messages via 
piping/redirection without intermittent fails. If -l & -e were one-shot without the -k, scripts could be more 
robust/streamlined with bidirectional conversation, a success/fail return message for instance, or query/response 
exchanges.

I'll switch to LinuxSpeak for clarity here...

Sending input over the net to a remote command and scraping for errors unidirectionally entails: listen piping to a 
command redirecting its stdout/err to a file, sleep while the other side starts its listener, connect and pipe the 
file's contents back. That sleep really slows things, on top of complicating what would otherwise be echo "$var"; read 
result in the connector's -e script, talking to the listener's -e anycmd (or 'anycmd;echo "ExitStatus: $?"').


David



      
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: