Nmap Development mailing list archives

Re: Raw IP NSE Functionality (Was Re: [NSE] Raw ethernet frame questions ...)


From: Kris Katterjohn <katterjohn () gmail com>
Date: Wed, 17 Feb 2010 22:37:46 -0600

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/17/2010 09:35 PM, Patrick Donnelly wrote:
On Wed, Feb 17, 2010 at 8:16 PM, David Fifield <david () bamsoftware com> wrote:
The nmap.is_privileged function I have no objection to. All the above is
fine with me. One thing deserves some further design discussion, which
is the nmap.get_ports function. I think it would be better to wrap
PortList::nextPort more directly, giving scripts one-at-a-time access to
port tables (and avoiding creating a potentially large table of tables,
most of which won't be used by many scripts). A script that needs the
full port list can easily create it by doing just what your C function
does, looping with nextPort. Scripts like ipidseq.nse that need just any
old port wouldn't need to allocate as much memory.

NSE currently iterates over the port tables in the same way Kris does
(create a large array of port tables). We can move to the other
approach but we will need to have some "complicated" userdata for the
for loop invariant (see generic for loops [1]). If we do this it
should be generic enough so that NSE can use it too. I can do this if
Kris doesn't want to.


Sure.  I'm not familiar with much else in NSE, so you're far better suited for
this than I am, especially with what you describe.

This is the last of David's points which need addressing; I've committed the
strerror() and xml docs changes.

Thanks,
Kris Katterjohn

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJLfMQZAAoJEEQxgFs5kUfuyPUP+gP5CsK/m77dsLfeTRpXrxtt
znhinnsDRyuE/376RhOoTH+dBBGCqOktm8VbFC2Yw+6XiMPAoF2cNvDDnFmqkO36
V0uIY3yJW9WqWDyUS84PkYcWP9slg4459hF/ruhDtX1jejHm99mUPU1zwBUNJmKi
VeMozcZ3C/9no+933VVqOySCUSRGvH+DZYu3gjHgwi2PBwYjMd6AWH71DL92BgFC
aMjb6bd/CtsaWo7iQeoPtOUvI592hi6DVSVUE0EaHvk9Zz7kc0a0OdcOz6+yDuUE
g8fWx72B/vWfI4XB8iai8DvlxPSbTPLrAj89kGVf0N3/mlwgq1iCZNHmllweo2rt
EiPmQR4zZZvpMeYPMAFvgavIeyEm4O3WWZ/nU0f2UMZtrK5wdhBwTmqeqwuDiO4H
s/jN/eR2pjMIiRDUmzb2WkZTsQbO8Ose70461JI696rqme1t+oEOVjVKikfz0WHe
5zUq8J6BrJnzuAS3ERCYLUJxmiXnDnuFgnBGGW/Nbv3c7d1E9z2MhcMmH4YjMcKy
cWWMGUJ8m9z032RizE1RTT6qHP4HeuF3meuZvyBmWwJ0XwPYossCwO6VvjGKVDQV
dx8PPg5bSaWmpKi36wpw9MRbQM0etFTL70LhfcWzamKtmORr0ixVH4pztfg38xVG
QmemH1yUDQbPGiCY9HVZ
=4Fdj
-----END PGP SIGNATURE-----
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: