Nmap Development mailing list archives
Re: [NSE API] Separate Dnet Objects?
From: majek04 <majek04+nmap-dev () gmail com>
Date: Mon, 31 Mar 2008 14:22:36 +0200
I see a couple different ways to organize the socket object(s): - - A connect()-only-style object via nmap.new_socket() and a separate "raw" object that includes pcap and dnet. - - An all-in-one object with connect()-style networking, raw packet receiving via pcap, and raw ethernet frame sending via dnet. This is what I prefer. Is there are particular reason for this?
Yes. Both pcap and sockets, use nsock library. The socket object contains of very similar fields, like nsock descriptor or timeout. So it was rather obvious to use the same object. On the other hand dnet doesn't share any fields with sockets. Dnet only needs to have dnet ethernet descriptor. (which is cached, but that's a different story). The next thing is ip_send method that I created on dnet object. http://ai.pjwstk.edu.pl/~majek/private/nmap/nse-pcap-u2/partial/nsepcap-sendip.diff Maybe there should be the same interface for sending ip packets as for sending ethernet frames? What do you think about something like: nmap.send_packet(packet_data, layer) // layer values: 2->ethernet, 3->ip
If not, is it too late to change this? Only promiscuous.nse appears to require the dnet functionality, so that's the only script that would need changing. Maybe an NSE student can do this this summer.
No, it's not too late. I can change it. Marek Majkowski _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [NSE API] Separate Dnet Objects? Kris Katterjohn (Mar 27)
- Re: [NSE API] Separate Dnet Objects? majek04 (Mar 31)
- Re: [NSE API] Separate Dnet Objects? Kris Katterjohn (Mar 31)
- Re: [NSE API] Separate Dnet Objects? majek04 (Mar 31)