Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: [NSE] Interface info of raw IPv4 sockets
From: David Fifield <david () bamsoftware com>
Date: Wed, 22 Jun 2011 08:57:31 -0700

On Wed, Jun 22, 2011 at 03:15:44PM +0200, Gorjan Petrovski wrote:

Recently I was crafting ICMP packets for a NSE script and I ran into a
great need for getting info about the interface on which a raw IPv4
socket is open[1]. I've managed to resolve this issue by opening a
simple socket and using that interface, however this is far from

It was suggested that I use the new nmap.get_interface() function, but
that returns nil no matter how I run it (hostrule, prerule). Has
anyone else encountered this? Any suggestions on how to debug it, or
is running gdb the only option?

I think get_interface is defined only when you run with the -e option,
so it's not a solution in your case.

David Fifield
Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]