Nmap Development mailing list archives
Re: payload file prototype
From: Jay Fink <jay.fink () gmail com>
Date: Mon, 1 Feb 2010 18:50:02 -0500
On Mon, Feb 1, 2010 at 1:32 PM, David Fifield <david () bamsoftware com> wrote:
So far so good, my question - if I follow your logic from the previous email is: Assuming I call the global payload something like AllPayloads *APL if AllPayloads exists find our payload and send back the payload itself else load up all AllPayloads parse_nmap_payload_file find our payload and send it back the payload itself.You can do that, but I think better would be to parse the file at the beginning of the program, or at the top of ultra_scan, and then have your payload-getting function assume that the data structure is in place. The reason is that you don't want the on-demand parsing to happen right at the beginning of a scan, when timers are started, etc.
Agreed, load once at some point during init. Again my thinking was off, in order to not touch any other part of nmap except the get_udp_payload function - but that makes more sense and we can bail earlier if there are any issues.
See how service_scan does it, with a call to AllProbes::service_scan_init at the top of the function.
Yep - I have been using that file as a reference since you told me where in it to look and will continue to do so.
That's a common computer scientist intinct, the urge to generalize fully right from the beginning. Finding the right level is an art. I like the file format we've created because it allows us to expand in the future, without requiring us to support everything we can think of now.
Thanks! and agreed - I mean if we get it right adding protocols later should be a snap (at least for the lookup part :-)
Keep it up! And don't get discouraged. Code review is hard for me and I usually come off sounding more critical than I intend.
You didn't come off critical at all - at least not to me :D Thanks again, regards, j _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- payload file prototype Jay Fink (Jan 18)
- Re: payload file prototype David Fifield (Jan 29)
- Re: payload file prototype Jay Fink (Jan 29)
- Re: payload file prototype Jay Fink (Jan 31)
- Re: payload file prototype David Fifield (Feb 01)
- Re: payload file prototype Jay Fink (Feb 01)
- Re: payload file prototype Jay Fink (Feb 04)
- Re: payload file prototype David Fifield (Jan 29)
- <Possible follow-ups>
- Re: payload file prototype David Fifield (Feb 09)
- Re: payload file prototype Jay Fink (Feb 11)
- Re: payload file prototype David Fifield (Feb 12)
- Re: payload file prototype Jay Fink (Feb 12)
- Re: payload file prototype Jay Fink (Feb 14)
- Re: payload file prototype David Fifield (Feb 15)
- Re: payload file prototype Jay Fink (Feb 16)
- Re: payload file prototype Jay Fink (Feb 18)
- Re: payload file prototype David Fifield (Feb 19)
- Re: payload file prototype Jay Fink (Feb 11)