Nmap Development mailing list archives

[NSE] Raw ethernet frame questions and NSE library questions


From: kx <kxmail () gmail com>
Date: Wed, 3 Feb 2010 22:05:17 -0500

  I just started tinkering with NSE. I am hoping this is not a series
of stupid questions, but are there NSE utilities or examples for
building raw ethernet frames (and raw ip packets in them) by using set
methods for all fields? Like an API for building a raw frame and
packet from scratch and then automagically doing all the checksums and
lengths for you (as well as common defaults for other fields if you so
choose)?

packet.nse looks like it has some, but it just starts with an IP
packet I believe, and doesn't have set methods for all fields.

I was thinking about something like Impacket
http://oss.coresecurity.com/projects/impacket.html, so that a simple
ping example would take a similar amount of code.
http://oss.coresecurity.com/impacket/ping.py

I wanted to start with sending some ICMP packets, so if nothing
exists, and I wanted to put functionality into a library, would it be
best to try to extend packet.nse, or create icmp.nse? The same would
go for ethernet.

Where would you want things like CRC-32? So long a license is
permissive in existing lua code, how do you feel about incorporating
code like: http://luamemcached.googlecode.com/svn/trunk/CRC32.lua

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


Current thread: