Nmap Development mailing list archives

Re: payload file prototype


From: David Fifield <david () bamsoftware com>
Date: Tue, 9 Feb 2010 21:23:40 -0800

On Thu, Feb 04, 2010 at 02:25:39PM -0500, Jay Fink wrote:
On Mon, Feb 1, 2010 at 1:32 PM, David Fifield <david () bamsoftware com> wrote:
I'm thinking of something like an std::map mapping (proto, port) pairs
to structs like
       struct Payload {
               char *data;
               ssize_t len;
               int sourceport;
       };

So as I have been researching this and going over how AllProbes works;
I ran into a question.

So I get that we want a global list of payloads but the problem I ran
into - and I am sure it *isn't* a problem I just dunno how to get
around it - is how do we account for the multiple ports in the global
list? For instance each item could look like:

I was thinking to use an std::map<proto_port, Payload> for the global
list of payloads, where proto_port would be like

struct proto_port {
        u8 proto;
        u16 port;
};

Then, when you have multiple ports, you just make them all map to the
same value (or copies of the same value).

David Fifield

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


Current thread: