Nmap Development mailing list archives

nmap.bind to set NSE socket source address


From: David Fifield <david () bamsoftware com>
Date: Sun, 11 Oct 2009 17:11:32 -0600

On Sat, Aug 29, 2009 at 08:46:39PM -0500, Ron wrote:
I'm trying to implement a script to send/receive DHCP Inform requests.  
And, it almost works, except for two problems that I don't know how to  
resolve.

I know these can both be fixed using raw sockets, but I'd really like to  
avoid that.

First, I need to set my source port to UDP/68 for these transactions. I  
don't see any way to do that using the connect() function. I realize  
that UDP/68 is reserved so r00t is required, but -sU requires root 
anyways.

Ron, I added the function nmap.bind in r15813. In the DHCP script you
will use it like this:

        try(socket:bind(nil, 68))

Let me know if it provides what you need.

David Fifield

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


Current thread: