Nmap Development mailing list archives

Re: [PATCH] Use stdin instead of opening /dev/tty in nmap_tty.cc


From: Kris Katterjohn <kjak () ispwest com>
Date: Wed, 04 Oct 2006 08:28:07 -0500

I wrote:
The attached patch uses stdin instead of opening /dev/tty for run-time
interaction. It makes it shorter and, except for handling non-blocking
mode, very simple.

I assume the Cygwin part of tty_getchar() is still required.

Everything I added in the patch is in POSIX.1, so it should be very
portable to non-Windows platforms (and probably more portable than
opening /dev/tty, etc.).

Also, really, tty_done() probably isn't needed because we're modifying
stdin and not a terminal, so when we exit (the only time it's called)
it's not going to affect anything. But leaving it shouldn't hurt either.

I've tested it quite a bit and everything seems to work fine.

It's a diff against 4.20ALPHA8

Thanks,
Kris Katterjohn


And it of course hits me as I lay sleepless in bed this morning that
stdin can be used for target specification.

I hate insomnia. But I suppose sending in bad patches and looking
clueless is better than seeing Tyler Durden :)


Kris

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


Current thread: