Nmap Development mailing list archives

Re: ncat broadcast support?


From: "Norris Carden" <ncarden () ascendfcu org>
Date: Fri, 14 May 2010 11:14:08 -0500

Adding broadcast support somewhere would allow for a DHCP test. Cool!


-----Original Message-----
From: nmap-dev-bounces () insecure org [mailto:nmap-dev-bounces () insecure org] On Behalf Of Daniel Miller
Sent: Thursday, May 13, 2010 5:19 PM
To: nmap-dev () insecure org
Subject: [BULK] Re: ncat broadcast support?
Importance: Low

On 05/13/2010 03:32 PM, Daniel Miller wrote:
On 05/12/2010 05:53 PM, Fyodor wrote:
My initial thought is that maybe we should have a function like
nsp_setbroadcast() which specifies whether, from that point on, all 
newly created sockets should have SO_BROADCAST set.  I suppose it 
should probably default to false, just like in the socket API.  But I 
imagine that Ncat, Nping, and Nmap may want to enable this.  Ncrack, 
on the other hand, may not.

The change would have to tested on Windows and UNIX.  If you really 
can't get access to a Windows system, you may be able to recruit 
testers on this list.

So I'd encourage you to write a patch, and I definitely encourage 
other folks to chime in if they know stuff about SO_BROADCAST that we 
don't, or if they have any other implementation ideas or concerns.

Cheers,
-F

This is the suggestion that I took. I have attached the patch, which 
appears to work well. I'll continue to test, and I'll see if I can try 
it on Windows, though I haven't compiled Nmap on Windows before.
Anyone who would like to test this out would be more than welcome.

Dan
Found a couple errors while trying to compile on Windows (no prototype for nsp_setbroadcast, cast to void * instead of 
const char * in setsockopt call). Fixed patch attached.



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


Current thread: