Nmap Development mailing list archives
Re: [NSE][PATCH] datafiles.lua
From: David Fifield <david () bamsoftware com>
Date: Mon, 15 Sep 2008 14:00:56 -0600
On Mon, Sep 15, 2008 at 10:13:51AM +0200, Sven Klemm wrote:
Hey jah,
|
| I envisioned the possibility of removing the
| parse_protocols/services/rpc functions at some point in the future. The
| common_files table holds a default format for the returned data for each
| file and allows simply calling, for example, parse_file( "nmap-services"
| ) and can easily be extended to include any future data files that might
| be included with nmap.
|
| Personally, I think that script writers will find it more intuitive to
| call parse_file in this way than being required to call specific
| functions for the various data files. What do you think?
the reason for the proposal was to remove a few if-branches for common
file handling in parse_file(). I prefer parse_rpc() over
parse_file('nmap-rpc') but I don't mind if we keep it the way it's
currently implemented.
I also prefer parse_rpc and similar functions for the other data files.
parse_file("nmap-services") and parse_file("nmap-rpc") look like they
they are doing the same thing to two different files, but they are not.
The two calls do different things based on the file name they are
passed.
I like Sven's proposal of keeping file-specific information in separate
functions and making parse_file generic, like its name makes it sound.
David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
Current thread:
- [NSE][PATCH] datafiles.lua Sven Klemm (Sep 09)
- Re: [NSE][PATCH] datafiles.lua jah (Sep 09)
- Re: [NSE][PATCH] datafiles.lua Sven Klemm (Sep 10)
- Re: [NSE][PATCH] datafiles.lua jah (Sep 10)
- Re: [NSE][PATCH] datafiles.lua Sven Klemm (Sep 13)
- Re: [NSE][PATCH] datafiles.lua jah (Sep 13)
- Re: [NSE][PATCH] datafiles.lua Sven Klemm (Sep 15)
- Re: [NSE][PATCH] datafiles.lua David Fifield (Sep 15)
- Re: [NSE][PATCH] datafiles.lua Sven Klemm (Sep 10)
- Re: [NSE][PATCH] datafiles.lua jah (Sep 09)
