[prev in list] [next in list] [prev in thread] [next in thread]
List: nmap-dev
Subject: Re: NSE suggestion
From: Michael Pattrick <mpattrick () rhinovirus ! org>
Date: 2009-04-25 2:09:53
Message-ID: 635c9fa20904241909p12730139kcb3c8b386d7e9791 () mail ! gmail ! com
[Download RAW message or body]
Indeed, attached is a patch that creates a new member variable named
mac_next_hop. I had considered setting mac_addr as the next hop
instead of nil, but thought better then that as it goes against the
documentations.
-Michael
On Fri, Apr 24, 2009 at 8:47 PM, Fyodor <fyodor@insecure.org> wrote:
> On Thu, Apr 23, 2009 at 11:57:48AM -0400, Michael Pattrick wrote:
>> Hello list,
>>
>> I find it kind of odd that NSE offers functions to send raw ethernet
>> frames but no good way to get the next hop mac address; or am I
>> missing something? I suggest that another LUA variable is added under
>> the 'nmap' class which reveals the next hop MAC address for the
>> current host.
>
> Good idea! =A0Do you want to write a patch? =A0Unless someone suggests a
> better way, it sounds like it is worth applying. =A0I would like to see
> the raw packet sending and sniffing NSE functionality used more, as a
> lot of fun can be had with that!
>
> Cheers,
> -F
>
["nexthop.patch" (application/octet-stream)]
Index: nse_nmaplib.cc
===================================================================
--- nse_nmaplib.cc (revision 13064)
+++ nse_nmaplib.cc (working copy)
@@ -162,6 +162,10 @@
lua_pushlstring (L, (const char*)currenths->MACAddress() , 6);
lua_setfield(L, -2, "mac_addr");
}
+ if(currenths->NextHopMACAddress()){ // else nil
+ lua_pushlstring (L, (const char*)currenths->NextHopMACAddress() , 6);
+ lua_setfield(L, -2, "mac_next_hop");
+ }
if(currenths->SrcMACAddress()){ // else nil
lua_pushlstring(L, (const char*)currenths->SrcMACAddress(), 6);
lua_setfield(L, -2, "mac_addr_src");
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic