Nmap Development mailing list archives

[NSE] [Call for Testers] Nsock Library Binding Improvements


From: Patrick Donnelly <batrick () batbytes com>
Date: Tue, 14 Sep 2010 03:19:06 -0400

Hello list,

I have a new branch for NSE's Nsock library binding. It is a
maintenance release focusing on correctness and preparation for Lua's
upcoming 5.2 release (it does not rely on Lua 5.2 right now). I would
greatly appreciate any script writers or Nmap users of NSE to quickly
test out the branch and report any problems they may encounter.
Ideally, you should notice no changes in how your scripts run. Please
report back if it works for you.

To check the branch out:

svn co --username guest --password ""
svn://svn.insecure.org/nmap-exp/patrick/nse-nsock-maintenance

To see the patch between versions:

svn diff svn://svn.insecure.org/nmap@20211
svn://svn.insecure.org/nmap-exp/patrick/nse-nsock-maintenance@20211 |
vim -


Changes in this branch (developers and the curious should read):

== General ==

o Unified nsock callbacks into one (except for a few exceptions like sleep).
o traces and other routine information for all socket methods are
unified into procedures for neatness.
o Prepatory work in nse_main.cc for Lua 5.2 C continuations. Lua 5.2
specific code is wrapped in "#define 0".
o New utility library nse_utility.cc|h that holds helpful Lua/NSE utility code.
o receive_buf bug fixes [1].

== DNET ==

o Moved all dnet code into separate source file nse_dnet.cc.
o Changed cache from C++ storage to Lua. This takes advantage of Lua's
GC to prevent leaks and stray open sockets.

== PCAP INCOMPATIBILITIES ==

o pcap_open takes boolean (promiscous) for 3rd argument. Callback removed.
o pcap_register obsolete and removed.
o pcap_receive returns packets matching the bpf filter. Packet
"hashes" via callbacks which filter extraneous packets is gone. You do
this yourself by inspecting the returned packets by pcap_receive.


Interesting statistics:

Lines added: 1323
Lines removed: 2049

batrick@batbytes:~/nmap/svn/nmap$ wc -l nse_nsock.cc
2264 nse_nsock.cc
batrick@batbytes:~/nmap/svn/patrick/nse-nsock-maintenance$ wc -l nse_nsock.cc
1072 nse_nsock.cc
batrick@batbytes:~/nmap/svn/patrick/nse-nsock-maintenance$ wc -l nse_dnet.cc
308 nse_dnet.cc


[1] http://seclists.org/nmap-dev/2010/q3/709

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


Current thread: