Nmap Development mailing list archives
Re: [patch] The most minor issue ever: set noninteractive on -iL -
From: David Fifield <david () bamsoftware com>
Date: Wed, 28 Mar 2012 11:14:27 -0700
On Wed, Mar 28, 2012 at 12:07:25PM -0500, Daniel Miller wrote:
List, While digging through the option parsing in nmap.cc for a presentation, I noticed that the input of hostnames (-iL or -i) could come from stdin. I think if this is used, then o.noninteractive should be set, since there would be no way to get keystrokes:Index: nmap.cc =================================================================== --- nmap.cc (revision 28355) +++ nmap.cc (working copy) @@ -1048,6 +1048,7 @@ } if (!strcmp(optarg, "-")) { o.inputfd = stdin; + o.noninteractive = true; } else { o.inputfd = fopen(optarg, "r"); if (!o.inputfd) {I doubt this really matters much, but I thought I'd mention it.
Thanks, Dan, but I think this is incorrect. Nmap doesn't get runtime interaction keystrokes from stdin, but from the tty. I just tested it and this works: nmap --scan-delay 10ms -iL - < input.txt But this doesn't: cat input.txt | nmap --scan-delay 10ms -iL - Probably there is some subshell interaction with the tty that prevents the second example from working. 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:
- [patch] The most minor issue ever: set noninteractive on -iL - Daniel Miller (Mar 28)
- Re: [patch] The most minor issue ever: set noninteractive on -iL - David Fifield (Mar 28)
- Re: [patch] The most minor issue ever: set noninteractive on -iL - Patrick Donnelly (Mar 28)
- Re: [patch] The most minor issue ever: set noninteractive on -iL - David Fifield (Mar 28)