Nmap Development mailing list archives
Re: potential ncat bug
From: David Fifield <david () bamsoftware com>
Date: Thu, 29 Apr 2010 09:08:19 -0600
On Wed, Apr 28, 2010 at 08:18:45PM -0400, Ryan Giobbi wrote:
In ncat is --keep-open supported with udp? I tried the below command but had to use the second to get the expected results. sudo ncat -l 8080 < foo.html -u -k while true; do sudo ncat -l 8080 < foo.html -u; done
No, --keep-open doesn't work with UDP. The reason for this is that UDP doesn't know who is "connected," so it defaults to sending to and receiving from the first client to send it data. In this case there's a good solution though; use sudo ncat -l -u --sh-exec "cat foo.html" This solves a problem with your first command that would even be a problem in TCP mode. Since Ncat is reading from stdin, it can only send the file once. Even if another client connects later, there's no more input for Ncat to read or send. So you have to use a loop like you did, or use --sh-exec which will start a new handler for each client. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- potential ncat bug Ryan Giobbi (Apr 28)
- Re: potential ncat bug David Fifield (Apr 29)